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 105
__construct(Connection $connection)
No description
at line 118
Fluent
__call(string $clause, array $args)
Appends new argument to the clause.
at line 205
Fluent
clause(string $clause)
Switch to a clause.
at line 219
Fluent
removeClause(string $clause)
Removes a clause.
at line 229
Fluent
setFlag(string $flag, bool $value = true)
Change a SQL flag.
at line 245
final bool
getFlag(string $flag)
Is a flag set?
at line 254
final string|null
getCommand()
Returns SQL command.
at line 260
final Connection
getConnection()
No description
at line 269
Fluent
setupResult(string $method)
Adds Result setup.
at line 284
Result|int|null
execute(string|null $return = null)
Generates and executes SQL query.
Returns result set or number of affected rows
at line 301
Row|array|null
fetch()
Generates, executes SQL query and fetches the single row.
at line 313
mixed
fetchSingle()
Like fetch(), but returns only first field.
Returns value on success, null if no next record
at line 324
array
fetchAll(int|null $offset = null, int|null $limit = null)
Fetches all records from table.
at line 334
array
fetchAssoc(string $assoc)
Fetches all records from table and returns associative tree.
at line 343
array
fetchPairs(string|null $key = null, string|null $value = null)
Fetches all records from table like $key => $value pairs.
at line 352
ResultIterator
getIterator(int|null $offset = null, int|null $limit = null)
Required by the IteratorAggregate interface.
at line 361
bool
test(string|null $clause = null)
Generates and prints SQL query or it's part.
at line 367
int
count()
No description
at line 390
DataSource
toDataSource()
No description
at line 399
final string
__toString()
Returns SQL query.
at line 408
protected array
_export(string|null $clause = null, array $args = [])
Generates parameters for Translator.
at line 446
static string
_formatClause(string $s)
internal |
Format camelCase clause name to UPPER CASE.
at line 457
__clone()
No description
at line 46
Fluent
select(mixed $field)
No description
at line 46
Fluent
distinct()
No description
at line 46
Fluent
from(mixed $table, mixed $args)
No description
at line 46
Fluent
where(mixed $cond)
No description
at line 46
Fluent
groupBy(mixed $field)
No description
at line 46
Fluent
having(mixed $cond)
No description
at line 46
Fluent
orderBy(mixed $field)
No description
at line 46
Fluent
limit(int $limit)
No description
at line 46
Fluent
offset(int $offset)
No description
at line 46
Fluent
join(mixed $table)
No description
at line 46
Fluent
leftJoin(mixed $table)
No description
at line 46
Fluent
innerJoin(mixed $table)
No description
at line 46
Fluent
rightJoin(mixed $table)
No description
at line 46
Fluent
outerJoin(mixed $table)
No description
at line 46
Fluent
as(mixed $field)
No description
at line 46
Fluent
on(mixed $cond)
No description
at line 46
Fluent
and(mixed $cond)
No description
at line 46
Fluent
or(mixed $cond)
No description
at line 46
Fluent
using(mixed $cond)
No description
at line 46
Fluent
update(mixed $cond)
No description
at line 46
Fluent
insert(mixed $cond)
No description
at line 46
Fluent
delete(mixed $cond)
No description
at line 46
Fluent
into(mixed $cond)
No description
at line 46
Fluent
values(mixed $cond)
No description
at line 46
Fluent
set(mixed $args)
No description
at line 46
Fluent
asc()
No description
at line 46
Fluent
desc()
No description