$sql
$sql : string
This utility is useful to create sql queries for SQLite.
It extends the SQLQueryBuilder and add SQLite-specific support.
update(string $table) : \Gishiki\Database\Adapters\Utils\SQLGenerator\SQLWrapperInterface
Add UPDATE %tablename% to the SQL query.
string | $table | the name of the table to be updated |
the updated sql builder
set(array $values) : \Gishiki\Database\Adapters\Utils\SQLGenerator\SQLWrapperInterface
Add SET col1 = ?, col2 = ?, col3 = ? to the SQL query.
array | $values | an associative array of columns => value to be changed |
the updated sql builder
createTable(string $tableName) : \Gishiki\Database\Adapters\Utils\SQLGenerator\SQLWrapperInterface
Add CREATE TABLE IF NOT EXISTS %tablename% to the SQL query.
string | $tableName | the name of the table |
the updated sql builder
dropTable(string $tableName) : \Gishiki\Database\Adapters\Utils\SQLGenerator\SQLWrapperInterface
Add DROP TABLE IF EXISTS %tablename% to the SQL query.
string | $tableName | the name of the table |
the updated sql builder
where(\Gishiki\Database\Runtime\SelectionCriteria $where) : \Gishiki\Database\Adapters\Utils\SQLGenerator\SQLWrapperInterface
Add WHERE col1 = ? OR col2 <= ? .
...... to the SQL query.
\Gishiki\Database\Runtime\SelectionCriteria | $where | the selection criteria |
the updated sql builder
insertInto(string $table) : \Gishiki\Database\Adapters\Utils\SQLGenerator\SQLWrapperInterface
Add INSERT INTO %tablename% to the SQL query.
string | $table | the name of the table to be affected |
the updated sql builder
values(array $values) : \Gishiki\Database\Adapters\Utils\SQLGenerator\SQLWrapperInterface
Add (col1, col2, col3) VALUES (?, ?, ?, ?) to the SQL query.
array | $values | an associative array of columnName => rowValue |
the updated sql builder
limitOffsetOrderBy(\Gishiki\Database\Runtime\ResultModifier $mod) : \Gishiki\Database\Adapters\Utils\SQLGenerator\SQLWrapperInterface
Add LIMIT ? OFFSET ? ORDER BY .
.... to the SQL query whether they are needed.
\Gishiki\Database\Runtime\ResultModifier | $mod | the result modifier |
the updated sql builder
selectAllFrom(string $table) : \Gishiki\Database\Adapters\Utils\SQLGenerator\SQLWrapperInterface
Add SELECT * FROM %tablename% to the SQL query.
string | $table | the name of the table to be affected |
the updated sql builder
selectFrom(string $table, array $fields) : \Gishiki\Database\Adapters\Utils\SQLGenerator\SQLWrapperInterface
Add SELECT col1, col2, col3 FROM %tablename% to the SQL query.
string | $table | the name of the table to be affected |
array | $fields | the list containing names of columns to be selected |
the updated sql builder
deleteFrom(string $table) : \Gishiki\Database\Adapters\Utils\SQLGenerator\SQLWrapperInterface
Add DELETE FROM %tablename% to the SQL query.
string | $table | the name of the table to be affected |
the updated sql builder
definedAs(array $columns) : \Gishiki\Database\Adapters\Utils\SQLGenerator\SQLWrapperInterface
Add (id INTEGER PRIMARY KEY NUT NULL, name TEXT NOT NULL, .
.. ) to the SQL query.
array | $columns | a collection of Gishiki\Database\Schema\Column |
the updated sql builder