\Drupflare\Anachron\Drupal DB

Summary

Methods
Properties
Constants
get
forTable
writing
reading
expandArrays
raw
No public properties found
No public constants found
No protected methods found
No protected properties found
No protected constants found
No private methods found
No private properties found
No private constants found

Methods

get()

get(array  $options = []) : mixed

Parameters

array $options

Returns

mixed —

forTable()

forTable(string  $table, array  $options = []) : \Drupal\Core\Database\Connection

Returns the connection for a query on a table, preparing the legacy system table first.

Parameters

string $table
array $options

Returns

\Drupal\Core\Database\Connection —

writing()

writing(string  $table, object  $query, \Drupal\Core\Database\Connection  $connection) : object

Wraps a write builder on the legacy system table so weights reach the extension config.

Parameters

string $table
object $query
\Drupal\Core\Database\Connection $connection

Returns

object —

reading()

reading(string  $table, object  $select) : object

Wraps a select builder so the tables it reads become cache tags when it runs.

Parameters

string $table
object $select

Returns

object —

expandArrays()

expandArrays(string  $query, array  $args) : array{0: string, 1: array<string,mixed>}

Marks an array placeholder with the trailing `[]` that Drupal 11 needs to expand it.

Drupal 7 expanded any placeholder whose value was an array. Drupal 11 refuses unless both the placeholder and its argument key end in [].

Parameters

string $query
array $args

Returns

array{0: string, 1: array} —

The query and the arguments, rewritten.

raw()

raw(string  $query, array  $options, callable  $run) : mixed

Prepares the legacy system table before a raw query that names it, and applies its writes.

Parameters

string $query
array $options
callable $run

Returns

mixed —