Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Namespaced helper functions for Database\Query functions #54

@hexus

Description

@hexus

Database\Storage eventually needs a way to represent database functions and expressions.

Functions sitting in a namespace could be very useful for this, because then you can use concise function names that read well.

use function Darya\Database\Storage\Query\Function\concat;

$results = $storage->query('users')
    ->where(concat('firstname', 'surname'), '=', 'Alexa')
    ->run();

Under the hood these helpers would just instantiate the relevant objects for the query to hold, which the translators will then use to generate SQL.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions