AdapterInterface Interface

Aurora\Database\Adapter Namespace


Methods

connect

Connect adapter

Return Value

  • bool

Signature

public function connect(): bool

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)

begin

Begin a transaction

Return Value

  • $this

Signature

public function begin()

commit

Commit transaction

Return Value

  • $this

Signature

public function commit()

rollback

Rollback transaction

Return Value

  • $this

Signature

public function rollback()

lastInsertId

Get the last inserted ID

Return Value

  • int

Signature

public function lastInsertId(): int

isConnected

Check if there is an active connection

Return Value

  • bool

Signature

public function isConnected(): bool

setLogger

Set LoggerInterface implementation

Parameters

  • Psr\Log\LoggerInterface $logger — LoggerInterface implementation

Signature

public function setLogger(Psr\Log\LoggerInterface $logger)

Go to top