Methods |
public
|
table(Closure|Builder|string $table, string|null $as = null): Builder
Begin a fluent query against a database table.
Begin a fluent query against a database table.
Implemented by
|
#
|
public
|
raw(mixed $value): Expression
Get a new raw query expression.
Get a new raw query expression.
Implemented by
|
#
|
public
|
selectOne(string $query, array $bindings = [], bool $useReadPdo = true): mixed
Run a select statement and return a single result.
Run a select statement and return a single result.
Implemented by
|
#
|
public
|
select(string $query, array $bindings = [], bool $useReadPdo = true): array
Run a select statement against the database.
Run a select statement against the database.
Implemented by
|
#
|
public
|
cursor(string $query, array $bindings = [], bool $useReadPdo = true): Generator
Run a select statement against the database and returns a generator.
Run a select statement against the database and returns a generator.
Implemented by
|
#
|
public
|
insert(string $query, array $bindings = []): bool
Run an insert statement against the database.
Run an insert statement against the database.
Implemented by
|
#
|
public
|
update(string $query, array $bindings = []): int
Run an update statement against the database.
Run an update statement against the database.
Implemented by
|
#
|
public
|
delete(string $query, array $bindings = []): int
Run a delete statement against the database.
Run a delete statement against the database.
Implemented by
|
#
|
public
|
statement(string $query, array $bindings = []): bool
Execute an SQL statement and return the boolean result.
Execute an SQL statement and return the boolean result.
Implemented by
|
#
|
public
|
affectingStatement(string $query, array $bindings = []): int
Run an SQL statement and get the number of rows affected.
Run an SQL statement and get the number of rows affected.
Implemented by
|
#
|
public
|
unprepared(string $query): bool
Run a raw, unprepared query against the PDO connection.
Run a raw, unprepared query against the PDO connection.
Implemented by
|
#
|
public
|
prepareBindings(array $bindings): array
Prepare the query bindings for execution.
Prepare the query bindings for execution.
Implemented by
|
#
|
public
|
transaction(Closure $callback, int $attempts = 1): mixed
Execute a Closure within a transaction.
Execute a Closure within a transaction.
Throws
|
#
|
public
|
beginTransaction(): void
Start a new database transaction.
Start a new database transaction.
|
#
|
public
|
commit(): void
Commit the active database transaction.
Commit the active database transaction.
|
#
|
public
|
rollBack(): void
Rollback the active database transaction.
Rollback the active database transaction.
|
#
|
public
|
transactionLevel(): int
Get the number of active transactions.
Get the number of active transactions.
|
#
|
public
|
pretend(Closure $callback): array
Execute the given callback in "dry run" mode.
Execute the given callback in "dry run" mode.
Implemented by
|
#
|
public
|
getDatabaseName(): string
Get the name of the connected database.
Get the name of the connected database.
Implemented by
|
#
|