Fluent
class Fluent implements IDataSource
SQL builder via fluent interfaces.
Constants
REMOVE |
|
Properties
static array | $masks | ||
static array | $modifiers | ||
static array | $separators | ||
static array | $clauseSwitches |
Methods
Removes a clause.
Is a flag set?
Returns SQL command.
No description
Adds Result setup.
Like fetch(), but returns only first field.
Fetches all records from table.
Fetches all records from table and returns associative tree.
Fetches all records from table like $key => $value pairs.
Required by the IteratorAggregate interface.
Generates and prints SQL query or it's part.
No description
No description
Returns SQL query.
Generates parameters for Translator.
Format camelCase clause name to UPPER CASE.
No description
Details
at line 111
__construct(Connection $connection)
No description
at line 124
Fluent
__call(string $clause, array $args)
Appends new argument to the clause.
at line 210
Fluent
clause(string $clause)
Switch to a clause.
at line 224
Fluent
removeClause(string $clause)
Removes a clause.
at line 234
Fluent
setFlag(string $flag, bool $value = true)
Change a SQL flag.
at line 249
final bool
getFlag(string $flag)
Is a flag set?
at line 258
final string|null
getCommand()
Returns SQL command.
at line 264
final Connection
getConnection()
No description
at line 273
Fluent
setupResult(string $method)
Adds Result setup.
at line 288
Result|int|null
execute(string $return = null)
Generates and executes SQL query.
at line 306
Row|array|null
fetch()
Generates, executes SQL query and fetches the single row.
at line 320
mixed
fetchSingle()
Like fetch(), but returns only first field.
at line 333
array
fetchAll(int $offset = null, int $limit = null)
Fetches all records from table.
at line 343
array
fetchAssoc(string $assoc)
Fetches all records from table and returns associative tree.
at line 352
array
fetchPairs(string $key = null, string $value = null)
Fetches all records from table like $key => $value pairs.
at line 361
ResultIterator
getIterator(int $offset = null, int $limit = null)
Required by the IteratorAggregate interface.
at line 370
bool
test(string $clause = null)
Generates and prints SQL query or it's part.
at line 376
int
count()
No description
at line 398
DataSource
toDataSource()
No description
at line 407
final string
__toString()
Returns SQL query.
at line 421
protected array
_export(string $clause = null, array $args = [])
Generates parameters for Translator.
at line 459
static string
_formatClause(string $s)
internal |
Format camelCase clause name to UPPER CASE.
at line 469
__clone()
No description
at line 38
Fluent
select(mixed $field)
No description
at line 38
Fluent
distinct()
No description
at line 38
Fluent
from(mixed $table, mixed $args)
No description
at line 38
Fluent
where(mixed $cond)
No description
at line 38
Fluent
groupBy(mixed $field)
No description
at line 38
Fluent
having(mixed $cond)
No description
at line 38
Fluent
orderBy(mixed $field)
No description
at line 38
Fluent
limit(int $limit)
No description
at line 38
Fluent
offset(int $offset)
No description
at line 38
Fluent
join(mixed $table)
No description
at line 38
Fluent
leftJoin(mixed $table)
No description
at line 38
Fluent
innerJoin(mixed $table)
No description
at line 38
Fluent
rightJoin(mixed $table)
No description
at line 38
Fluent
outerJoin(mixed $table)
No description
at line 38
Fluent
as(mixed $field)
No description
at line 38
Fluent
on(mixed $cond)
No description
at line 38
Fluent
and(mixed $cond)
No description
at line 38
Fluent
or(mixed $cond)
No description
at line 38
Fluent
using(mixed $cond)
No description
at line 38
Fluent
asc()
No description
at line 38
Fluent
desc()
No description
Traits
Better OOP experience.