SQLiteConnection
class SQLiteConnection extends Connection (View source)
Traits
Methods
Create a new database connection instance.
Set the schema grammar to the default implementation.
Set the query post processor to the default implementation.
Run a select statement and return a single result.
Run a select statement against the database.
Run a select statement against the database.
Run an insert statement against the database.
Run an update statement against the database.
Run a delete statement against the database.
Execute an SQL statement and return the boolean result.
Run an SQL statement and get the number of rows affected.
Run a raw, unprepared query against the PDO connection.
Log a query in the connection's query log.
Get a Doctrine Schema Column instance.
Get the Doctrine DBAL schema manager for the connection.
Get the Doctrine DBAL database connection instance.
Set the reconnect instance on the connection.
Details
in Connection at line line 146
void
__construct(
PDO $pdo,
string $database = '',
string $tablePrefix = '',
array $config = array())
Create a new database connection instance.
in Connection at line line 172
void
useDefaultQueryGrammar()
Set the query grammar to the default implementation.
in Connection at line line 192
void
useDefaultSchemaGrammar()
Set the schema grammar to the default implementation.
in Connection at line line 212
void
useDefaultPostProcessor()
Set the query post processor to the default implementation.
in Connection at line line 232
Builder
getSchemaBuilder()
Get a schema builder instance for the connection.
in Connection at line line 247
Builder
table(
string $table)
Begin a fluent query against a database table.
in Connection at line line 282
mixed
selectOne(
string $query,
array $bindings = array())
Run a select statement and return a single result.
in Connection at line line 296
array
selectFromWriteConnection(
string $query,
array $bindings = array())
Run a select statement against the database.
in Connection at line line 309
array
select(
string $query,
array $bindings = array(),
bool $useReadPdo = true)
Run a select statement against the database.
in Connection at line line 345
bool
insert(
string $query,
array $bindings = array())
Run an insert statement against the database.
in Connection at line line 357
int
update(
string $query,
array $bindings = array())
Run an update statement against the database.
in Connection at line line 369
int
delete(
string $query,
array $bindings = array())
Run a delete statement against the database.
in Connection at line line 381
bool
statement(
string $query,
array $bindings = array())
Execute an SQL statement and return the boolean result.
in Connection at line line 401
int
affectingStatement(
string $query,
array $bindings = array())
Run an SQL statement and get the number of rows affected.
in Connection at line line 425
bool
unprepared(
string $query)
Run a raw, unprepared query against the PDO connection.
in Connection at line line 442
array
prepareBindings(
array $bindings)
Prepare the query bindings for execution.
in Connection at line line 468
mixed
transaction(
Closure $callback)
Execute a Closure within a transaction.
in Connection at line line 569
array
pretend(
Closure $callback)
Execute the given callback in "dry run" mode.
in Connection at line line 731
void
logQuery(
string $query,
array $bindings,
float|null $time = null)
Log a query in the connection's query log.
in Connection at line line 750
void
listen(
Closure $callback)
Register a database query listener with the connection.
in Connection at line line 798
Column
getDoctrineColumn(
string $table,
string $column)
Get a Doctrine Schema Column instance.
in Connection at line line 810
AbstractSchemaManager
getDoctrineSchemaManager()
Get the Doctrine DBAL schema manager for the connection.
in Connection at line line 820
Connection
getDoctrineConnection()
Get the Doctrine DBAL database connection instance.
in Connection at line line 880
$this
setReadPdo(
PDO|null $pdo)
Set the PDO connection used for reading.
in Connection at line line 893
$this
setReconnector(
callable $reconnector)
Set the reconnect instance on the connection.
in Connection at line line 916
mixed
getConfig(
string $option)
Get an option from the configuration options.
in Connection at line line 936
Grammar
getQueryGrammar()
Get the query grammar used by the connection.
in Connection at line line 947
void
setQueryGrammar(
Grammar $grammar)
Set the query grammar used by the connection.
in Connection at line line 957
Grammar
getSchemaGrammar()
Get the schema grammar used by the connection.
in Connection at line line 968
void
setSchemaGrammar(
Grammar $grammar)
Set the schema grammar used by the connection.
in Connection at line line 978
Processor
getPostProcessor()
Get the query post processor used by the connection.
in Connection at line line 989
void
setPostProcessor(
Processor $processor)
Set the query post processor used by the connection.
in Connection at line line 999
Dispatcher
getEventDispatcher()
Get the event dispatcher used by the connection.
in Connection at line line 1010
void
setEventDispatcher(
Dispatcher $events)
Set the event dispatcher instance on the connection.
in Connection at line line 1041
int
setFetchMode(
int $fetchMode)
Set the default fetch mode for the connection.
in Connection at line line 1112
string
setDatabaseName(
string $database)
Set the name of the connected database.
in Connection at line line 1133
void
setTablePrefix(
string $prefix)
Set the table prefix in use by the connection.
in Connection at line line 1146
Grammar
withTablePrefix(
Grammar $grammar)
Set the table prefix and return the grammar.