Fluent
class Fluent implements IDataSource
SQL builder via fluent interfaces.
Constants
REMOVE |
|
Properties
static | $masks | ||
static | $modifiers | default modifiers for arrays |
|
static | $separators | clauses separators |
|
static | $clauseSwitches | clauses |
Methods
Removes a clause.
Is a flag set?
Returns SQL command.
No description
Adds Result setup.
Generates and executes SQL query.
Generates, executes SQL query and fetches the single row.
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 110
__construct(Connection $connection)
No description
at line 123
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 250
final bool
getFlag(string $flag)
Is a flag set?
at line 259
final string|null
getCommand()
Returns SQL command.
at line 265
final Connection
getConnection()
No description
at line 274
Fluent
setupResult(string $method)
Adds Result setup.
at line 289
Result|int|null
execute(string|null $return = null)
Generates and executes SQL query.
Returns result set or number of affected rows
at line 306
Row|array|null
fetch()
Generates, executes SQL query and fetches the single row.
at line 318
mixed
fetchSingle()
Like fetch(), but returns only first field.
Returns value on success, null if no next record
at line 329
array
fetchAll(int|null $offset = null, int|null $limit = null)
Fetches all records from table.
at line 339
array
fetchAssoc(string $assoc)
Fetches all records from table and returns associative tree.
at line 348
array
fetchPairs(string|null $key = null, string|null $value = null)
Fetches all records from table like $key => $value pairs.
at line 357
ResultIterator
getIterator(int|null $offset = null, int|null $limit = null)
Required by the IteratorAggregate interface.
at line 366
bool
test(string|null $clause = null)
Generates and prints SQL query or it's part.
at line 372
int
count()
No description
at line 395
DataSource
toDataSource()
No description
at line 404
final string
__toString()
Returns SQL query.
at line 413
protected array
_export(string|null $clause = null, array $args = [])
Generates parameters for Translator.
at line 451
static string
_formatClause(string $s)
internal |
Format camelCase clause name to UPPER CASE.
at line 462
__clone()
No description
at line 44
Fluent
select(mixed $field)
No description
at line 44
Fluent
distinct()
No description
at line 44
Fluent
from(mixed $table, mixed $args)
No description
at line 44
Fluent
where(mixed $cond)
No description
at line 44
Fluent
groupBy(mixed $field)
No description
at line 44
Fluent
having(mixed $cond)
No description
at line 44
Fluent
orderBy(mixed $field)
No description
at line 44
Fluent
limit(int $limit)
No description
at line 44
Fluent
offset(int $offset)
No description
at line 44
Fluent
join(mixed $table)
No description
at line 44
Fluent
leftJoin(mixed $table)
No description
at line 44
Fluent
innerJoin(mixed $table)
No description
at line 44
Fluent
rightJoin(mixed $table)
No description
at line 44
Fluent
outerJoin(mixed $table)
No description
at line 44
Fluent
as(mixed $field)
No description
at line 44
Fluent
on(mixed $cond)
No description
at line 44
Fluent
and(mixed $cond)
No description
at line 44
Fluent
or(mixed $cond)
No description
at line 44
Fluent
using(mixed $cond)
No description
at line 44
Fluent
update(mixed $cond)
No description
at line 44
Fluent
insert(mixed $cond)
No description
at line 44
Fluent
delete(mixed $cond)
No description
at line 44
Fluent
into(mixed $cond)
No description
at line 44
Fluent
values(mixed $cond)
No description
at line 44
Fluent
set(mixed $args)
No description
at line 44
Fluent
asc()
No description
at line 44
Fluent
desc()
No description
Traits
Better OOP experience.