Connection Class
Aurora\Database Namespace
Properties
adapter
Adapter
protected $adapter: \AdapterInterface
queryBuilder
Query builder
protected $queryBuilder: \QueryBuilderInterface
schemaBuilder
Schema builder
protected $schemaBuilder: \SchemaBuilderInterface
options
Options array
protected $options = []: array
Constructor
__construct
Constructor
Parameters
array
$options
— Connection options
Signature
public function __construct(array $options)
Methods
__construct
Constructor
Parameters
-
array
$options
— Connection options
Signature
public function __construct(array $options)
getAdapter
Get Adapter
Return Value
\AdapterInterface
Signature
public function getAdapter(): Aurora\Database\Adapter\AdapterInterface
getQueryBuilder
Get query Builder
Return Value
\QueryBuilderInterface
Signature
public function getQueryBuilder(): Aurora\Database\Query\Builder\BuilderInterface
getSchemaBuilder
Get schema Builder
Return Value
\SchemaBuilderInterface
Signature
public function getSchemaBuilder(): Aurora\Database\Schema\Builder\BuilderInterface
getOptions
Get connection options
Return Value
array
Signature
public function getOptions(): array
getOption
Get connection option
Parameters
-
string
$name
— Option name -
mixed
$default
— Default value
Return Value
mixed
Signature
public function getOption(string $name, mixed $default = '')
query
Execute a query
Parameters
-
string
$query
— Query string -
array
$parameters
— Array of parameters -
Closure
$callback
— Optional callback
Return Value
mixed
Signature
public function query(string $query, array $parameters = [], Closure $callback)
transaction
Execute a transaction
Parameters
-
Closure
$callback
— Transaction callback
Return Value
bool
Signature
public function transaction(Closure $callback)
lastInsertId
Get the last inserted ID
Return Value
int
Signature
public function lastInsertId(): int