PHP Класс lithium\data\source\Database

Наследование: extends lithium\data\Source
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$connection PD\PDO Holds the current connection.

Защищенные свойства (Protected)

Свойство Тип Описание
$_cachedNames array Holds cached names.
$_classes array Classes used by Database.
$_columns array The supported column types and their default values
$_constraintTypes
$_operators array List of SQL operators, paired with handling options.
$_quotes array A pair of opening/closing quote characters used for quoting identifiers in SQL queries.
$_strategies array Array of named callable objects representing different strategies for performing specific types of queries.
$_strings array Strings used to render the given statement

Открытые методы

Метод Описание
__construct ( array $config = [] ) : void Constructor.
alias ( $alias, $context )
applyStrategy ( array $options, object $context ) Applying a strategy to a lithium\data\model\Query object
calculation ( string $type, mixed $query, array $options = [] ) : integer | null Executes calculation-related queries, such as those required for count and other aggregates.
cast ( $entity, array $data, array $options = [] )
column ( $field ) : string Generate a database-native column schema string
comment ( string $comment ) : string Adds formatting to SQL comments before they're embedded in queries.
conditions ( string | array $conditions, object $context, array $options = [] ) : string Returns a string of formatted conditions to be inserted into the query statement. If the query conditions are defined as an array, key pairs are converted to SQL strings.
connect ( ) : boolean Connects to the database by creating a PDO intance using the constructed DSN string.
constraints ( string | array $constraints, Query $context, array $options = [] ) : string Returns a string of formatted constraints to be inserted into the query statement.
create ( object $query, array $options = [] ) : boolean Inserts a new record into the database based on a the Query. The record is updated with the id of the insert.
createSchema ( string $source, object $schema ) : boolean Create a database-native schema
delete ( object $query, array $options = [] ) : boolean Deletes a record in the database based on the given Query.
disconnect ( ) : boolean Disconnects the adapter from the database.
dropSchema ( string $source, boolean $soft = true ) : boolean Drops a table.
encoding ( mixed $encoding = null ) : mixed. Getter/Setter for the connection's encoding Abstract. Must be defined by child class.
error ( ) Return the last errors produced by a the execution of a query.
fields ( array $fields, object $context ) : string Returns a string of formatted fields to be inserted into the query statement.
group ( string | array $group, object $context ) : string | null Return formatted clause for GROUP BY with known fields escaped.
having ( string | array $conditions, object $context, array $options = [] ) : string Returns a string of formatted havings to be inserted into the query statement. If the query havings are defined as an array, key pairs are converted to SQL strings.
join ( object $context, object $rel, string $fromAlias = null, string $toAlias = null, mixed $constraints = [] ) Set a query's join according a Relationship.
joins ( array $joins, Query $context ) : string Returns a join statement for given array of query objects
limit ( integer $limit, Query $context ) : string Returns a LIMIT statement from the given limit and the offset of the context object.
methods ( ) : array Determines the set of methods to be used when exporting query values.
name ( string $name ) : string Field name handler to ensure proper escaping.
on ( object $rel, $aliasFrom = null, $aliasTo = null, array $constraints = [] ) : array Build the ON constraints from a Relationship instance
order ( string | array $order, object $context ) : string | null Return formatted clause for ORDER BY with known fields escaped and directions normalized to uppercase. When order direction is missing or unrecognized defaults to ASC.
read ( string | object $query, array $options = [] ) : mixed Reads records from a database using a lithium\data\model\Query object or raw SQL string.
relationship ( string $class, string $type, string $name, array $config = [] ) : array Defines or modifies the default settings of a relationship between two models.
renderCommand ( string $type, string $data = null, string $context = null ) : string Returns a given type statement for the given data, rendered from Database::$_strings.
schema ( Query $query, Result | null $resource = null, object | null $context = null ) : array Builds an array of keyed on the fully-namespaced Model with array of fields as values for the given Query
update ( object $query, array $options = [] ) : boolean Updates a record in the database based on the given Query.
value ( mixed $value, array $schema = [] ) : mixed Converts a given value into the proper type based on a given schema definition.

Защищенные методы

Метод Описание
_aliasing ( string $name, string $alias, array $map = [] ) : string Helper which add an alias basename to a field name if necessary
_buildConstraints ( array $constraints, type $schema = null, type $joiner = ' ', $primary = false ) : string Helper for building columns constraints
_buildMetas ( $type, array $metas, array $names = null, type $joiner = ' ' ) : string Helper for building columns metas
_cast ( string $type, string $value, array $column, array $schema = [] ) : mixed Cast a value according to a column type, used by Database::value().
_conditions ( string | array $conditions, object $context, array $options = [] ) : string Returns a string of formatted conditions to be inserted into the query statement.
_constraint ( string $name, mixed $value, object $schema = null ) : string Build a SQL column constraint
_constraints ( array $constraints ) : array Auto escape string value to a field name value
_createFields ( array $data, array $schema, object $context ) : array Renders the fields part for _create_ queries.
_entityName ( string $entity, array $options = [] ) : string Returns a fully-qualified table name (i.e. with prefix), quoted.
_error ( string $sql ) Throw a QueryException error
_execute ( string $sql ) : Result Execute a given query Abstract. Must be defined by child class.
_fieldName ( string $field ) : string Return the field name from a conditions key.
_fields ( array $fields, object $context ) : array Reformats fields to be alias based.
_fieldsQuote ( string $alias, string $field ) : string Quotes fields, also handles aliased fields.
_fieldsReturn ( string $type, object $context, array $fields, array $schema ) : string | array Renders the fields SQL fragment for queries.
_formatters ( ) : array Provide an associative array of Closures to be used as the 'formatter' key inside of the Database::$_columns specification. Each Closure should return the appropriately quoted or unquoted value and accept one or two parameters: $format, the format to apply to value and $value, the value to be formatted.
_init ( ) Initializer. Initializes properties like Database::$_strategies because closures cannot be created within the class definition.
_insertId ( $query ) : void Get the last insert id from the database.
_introspectType ( mixed $value ) : string Attempts to automatically determine the column type of a value. Used by the value() method of various database adapters to determine how to prepare a value if the schema is not specified.
_meta ( string $type, string $name, mixed $value ) : string Build a SQL column/table meta.
_on ( array $constraints, $aliasFrom, $aliasTo, $mapAlias = [] )
_operator ( string $key, mixed $value, array $schema = [], array $options = [] ) : string Handles conversion of SQL operator keys to SQL statements.
_processConditions ( $key, $value, $context, $schema = null, $glue = 'AND' )
_processOperator ( $key, $value, $fieldMeta, $glue ) : mixed Helper method used by _processConditions.
_queryExport ( object $query ) : array Helper method for Database::read() to export query while handling additional joins when using relationships and limited result sets. Filters conditions on subsequent queries to just the ones applying to the relation.
_schema ( Query $query, array | null $fields = null ) : array Helper method for data\model\Database::shema()
_splitFieldname ( string $field ) : array Return the alias and the field name from an identifier name.
_toBoolean ( mixed $value ) : boolean Casts a value which is being written or compared to a boolean-type database column.
_updateFields ( array $data, array $schema, object $context ) : string Renders the fields part for _update_ queries.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( array $config = [] ) : void
$config array array Available configuration options are: - `'database'` _string_: Name of the database to use. Defaults to `null`. - `'host'` _string_: Name/address of server to connect to. Defaults to `'localhost'`. - `'login'` _string_: Username to use when connecting to server. Defaults to `'root'`. - `'password'` _string_: Password to use when connecting to server. Defaults to `''`. - `'persistent'` _boolean_: If true a persistent connection will be attempted, provided the adapter supports it. Defaults to `true`.
Результат void

_aliasing() защищенный Метод

Helper which add an alias basename to a field name if necessary
protected _aliasing ( string $name, string $alias, array $map = [] ) : string
$name string The field name.
$alias string The alias name
$map array An array of `'modelname' => 'aliasname'` mapping
Результат string

_buildConstraints() защищенный Метод

Helper for building columns constraints
См. также: lithium\data\soure\Database::createSchema()
protected _buildConstraints ( array $constraints, type $schema = null, type $joiner = ' ', $primary = false ) : string
$constraints array The array of constraints
$schema type The schema of the table
$joiner type The join character
Результат string The SQL constraints

_buildMetas() защищенный Метод

Helper for building columns metas
См. также: lithium\data\soure\Database::createSchema()
См. также: lithium\data\soure\Database::column()
protected _buildMetas ( $type, array $metas, array $names = null, type $joiner = ' ' ) : string
$metas array The array of column metas.
$names array If `$names` is not `null` only build meta present in `$names`
$joiner type The join character
Результат string The SQL constraints

_cast() защищенный Метод

Cast a value according to a column type, used by Database::value().
См. также: lithium\data\source\Database::value()
protected _cast ( string $type, string $value, array $column, array $schema = [] ) : mixed
$type string Name of the column type.
$value string Value to cast.
$column array The column definition.
$schema array Formatted array from `lithium\data\source\Database::schema()`.
Результат mixed Casted value.

_conditions() защищенный Метод

If the query conditions are defined as an array, key pairs are converted to SQL strings. If $key is numeric and $value is a string, $value is treated as a literal SQL fragment and returned.
protected _conditions ( string | array $conditions, object $context, array $options = [] ) : string
$conditions string | array The conditions for this query.
$context object The current `lithium\data\model\Query` instance.
$options array Available options are: - `'prepend'` _boolean|string_: The string to prepend or `false` for no prepending. Defaults to `false`.
Результат string Returns an SQL conditions clause.

_constraint() защищенный Метод

Build a SQL column constraint
protected _constraint ( string $name, mixed $value, object $schema = null ) : string
$name string The name of the meta to build
$value mixed The value used for building the meta
$schema object A `Schema` instance.
Результат string The SQL meta string

_constraints() защищенный Метод

Auto escape string value to a field name value
protected _constraints ( array $constraints ) : array
$constraints array The constraints array
Результат array The escaped constraints array

_createFields() защищенный Метод

Renders the fields part for _create_ queries.
См. также: lithium\data\source\Database::_fieldsReturn()
protected _createFields ( array $data, array $schema, object $context ) : array
$data array
$schema array An array defining the schema of the fields used in the criteria.
$context object Generally a `data\model\Query` instance.
Результат array Array with `fields` and `values` keys which hold SQL fragments of fields an values separated by comma.

_entityName() защищенный Метод

Returns a fully-qualified table name (i.e. with prefix), quoted.
protected _entityName ( string $entity, array $options = [] ) : string
$entity string A table name or fully-namespaced model class name.
$options array Available options: - `'quoted'` _boolean_: Indicates whether the name should be quoted.
Результат string Returns a quoted table name.

_error() защищенный Метод

Throw a QueryException error
protected _error ( string $sql )
$sql string The offending SQL string

_execute() абстрактный защищенный Метод

Execute a given query Abstract. Must be defined by child class.
См. также: lithium\data\source\Database::renderCommand()
abstract protected _execute ( string $sql ) : Result
$sql string The sql string to execute
Результат Result Returns a result object if the query was successful.

_fieldName() защищенный Метод

Return the field name from a conditions key.
protected _fieldName ( string $field ) : string
$field string Field or identifier name.
Результат string Returns the field name without the table alias, if applicable.

_fields() защищенный Метод

Reformats fields to be alias based.
См. также: lithium\data\source\Database::fields()
См. также: lithium\data\source\Database::schema()
protected _fields ( array $fields, object $context ) : array
$fields array Array of fields.
$context object Generally a `data\model\Query` instance.
Результат array Reformatted fields

_fieldsQuote() защищенный Метод

Quotes fields, also handles aliased fields.
См. также: lithium\data\source\Database::fields()
protected _fieldsQuote ( string $alias, string $field ) : string
$alias string
$field string
Результат string The quoted field.

_fieldsReturn() защищенный Метод

Renders the fields SQL fragment for queries.
См. также: lithium\data\source\Database::fields()
protected _fieldsReturn ( string $type, object $context, array $fields, array $schema ) : string | array
$type string Type of query i.e. `'create'` or `'update'`.
$context object Generally a `data\model\Query` instance.
$fields array
$schema array An array defining the schema of the fields used in the criteria.
Результат string | array

_formatters() защищенный Метод

Example formatter function: function($format, $value) { return is_numeric($value) ? (integer) $value : false; }
См. также: lithium\data\source\Database::$_columns
См. также: lithium\data\source\Database::_init()
protected _formatters ( ) : array
Результат array of column types to Closure formatter

_init() защищенный Метод

Initializer. Initializes properties like Database::$_strategies because closures cannot be created within the class definition.
См. также: lithium\data\source\Database::$_columns
См. также: lithium\data\source\Database::$_strings
См. также: lithium\data\source\Database::$_strategies
protected _init ( )

_insertId() абстрактный защищенный Метод

Abstract. Must be defined by child class.
abstract protected _insertId ( $query ) : void
$query lithium\data\model\Query $context The given query.
Результат void

_introspectType() защищенный Метод

Attempts to automatically determine the column type of a value. Used by the value() method of various database adapters to determine how to prepare a value if the schema is not specified.
protected _introspectType ( mixed $value ) : string
$value mixed The value to be prepared for an SQL query.
Результат string Returns the name of the column type which `$value` most likely belongs to.

_meta() защищенный Метод

Build a SQL column/table meta.
protected _meta ( string $type, string $name, mixed $value ) : string
$type string The type of the meta to build (possible values: `'table'` or `'column'`).
$name string The name of the meta to build.
$value mixed The value used for building the meta.
Результат string The SQL meta string.

_on() защищенный Метод

protected _on ( array $constraints, $aliasFrom, $aliasTo, $mapAlias = [] )
$constraints array

_operator() защищенный Метод

Handles conversion of SQL operator keys to SQL statements.
protected _operator ( string $key, mixed $value, array $schema = [], array $options = [] ) : string
$key string Key in a conditions array. Usually a field name.
$value mixed An SQL operator or comparison value.
$schema array An array defining the schema of the field used in the criteria.
$options array
Результат string Returns an SQL string representing part of a `WHERE` clause of a query.

_processConditions() защищенный Метод

protected _processConditions ( $key, $value, $context, $schema = null, $glue = 'AND' )

_processOperator() защищенный Метод

Helper method used by _processConditions.
protected _processOperator ( $key, $value, $fieldMeta, $glue ) : mixed
Результат mixed Returns the operator expression string or `false` if no operator is applicable.

_queryExport() защищенный Метод

Helper method for Database::read() to export query while handling additional joins when using relationships and limited result sets. Filters conditions on subsequent queries to just the ones applying to the relation.
См. также: lithium\data\source\Database::read()
protected _queryExport ( object $query ) : array
$query object The query object.
Результат array The exported query returned by reference.

_schema() защищенный Метод

Helper method for data\model\Database::shema()
protected _schema ( Query $query, array | null $fields = null ) : array
$query lithium\data\model\Query A Query instance.
$fields array | null Array of formatted fields.
Результат array

_splitFieldname() защищенный Метод

Return the alias and the field name from an identifier name.
protected _splitFieldname ( string $field ) : array
$field string Field name or identifier name.
Результат array Returns an array with the alias (or `null` if not applicable) as first value and the field name as second value.

_toBoolean() защищенный Метод

Casts a value which is being written or compared to a boolean-type database column.
protected _toBoolean ( mixed $value ) : boolean
$value mixed A value of unknown type to be cast to boolean. Numeric values not equal to zero evaluate to `true`, otherwise `false`. String values equal to `'true'`, `'t'` or `'T'` evaluate to `true`, all others to `false`. In all other cases, uses PHP's default casting.
Результат boolean Returns a boolean representation of `$value`, based on the comparison rules specified above. Database adapters may override this method if boolean type coercion is required and falls outside the rules defined.

_updateFields() защищенный Метод

Also handles correct incremented/decremented fields.
См. также: lithium\data\Entity::increment()
См. также: lithium\data\source\Database::_fieldsReturn()
protected _updateFields ( array $data, array $schema, object $context ) : string
$data array
$schema array An array defining the schema of the fields used in the criteria.
$context object Generally a `data\model\Query` instance.
Результат string SQL fragment, with fields separated by comma.

alias() публичный Метод

public alias ( $alias, $context )

applyStrategy() публичный Метод

Applying a strategy to a lithium\data\model\Query object
public applyStrategy ( array $options, object $context )
$options array The option array
$context object A find query object to configure

calculation() публичный Метод

Executes calculation-related queries, such as those required for count and other aggregates.
public calculation ( string $type, mixed $query, array $options = [] ) : integer | null
$type string Only accepts `count`.
$query mixed The query to be executed.
$options array Optional arguments for the `read()` query that will be executed to obtain the calculation result.
Результат integer | null Result of the calculation or `null` if the calculation failed.

cast() публичный Метод

public cast ( $entity, array $data, array $options = [] )
$data array
$options array

column() публичный Метод

Generate a database-native column schema string
public column ( $field ) : string
Результат string SQL string

comment() публичный Метод

Adds formatting to SQL comments before they're embedded in queries.
public comment ( string $comment ) : string
$comment string
Результат string

conditions() публичный Метод

Conversion rules are as follows: - If $key is numeric and $value is a string, $value is treated as a literal SQL fragment and returned.
public conditions ( string | array $conditions, object $context, array $options = [] ) : string
$conditions string | array The conditions for this query.
$context object The current `lithium\data\model\Query` instance.
$options array Available options are: - `'prepend'` _boolean|string_: The string to prepend or `false` for no prepending. Defaults to `'WHERE'`.
Результат string Returns the `WHERE` clause of an SQL query.

connect() публичный Метод

Will set general options on the connection as provided (persistence, encoding).
См. также: lithium\data\source\Database::encoding()
public connect ( ) : boolean
Результат boolean Returns `true` if a database connection could be established, otherwise `false`.

constraints() публичный Метод

If the query constraints are defined as an array, key pairs are converted to SQL strings. If $key is numeric and $value is a string, $value is treated as a literal SQL fragment and returned.
public constraints ( string | array $constraints, Query $context, array $options = [] ) : string
$constraints string | array The constraints for a `ON` clause.
$context lithium\data\model\Query
$options array Available options are: - `'prepend'` _boolean|string_: The string to prepend or `false` for no prepending. Defaults to `'ON'`.
Результат string Returns the `ON` clause of an SQL query.

create() публичный Метод

Inserts a new record into the database based on a the Query. The record is updated with the id of the insert.
См. также: lithium\util\String::insert()
public create ( object $query, array $options = [] ) : boolean
$query object An SQL query string, or `lithium\data\model\Query` object instance.
$options array If $query is a string, $options contains an array of bind values to be escaped, quoted, and inserted into `$query` using `String::insert()`.
Результат boolean Returns `true` if the query succeeded, otherwise `false`.

createSchema() публичный Метод

Create a database-native schema
public createSchema ( string $source, object $schema ) : boolean
$source string A table name.
$schema object A `Schema` instance.
Результат boolean `true` on success, `true` otherwise

delete() публичный Метод

Deletes a record in the database based on the given Query.
public delete ( object $query, array $options = [] ) : boolean
$query object An SQL string, or `lithium\data\model\Query` object instance.
$options array If `$query` is a string, `$options` is the array of quoted/escaped parameter values to be inserted into the query.
Результат boolean Returns `true` on successful query execution (not necessarily if records are deleted), otherwise `false`.

disconnect() публичный Метод

Disconnects the adapter from the database.
public disconnect ( ) : boolean
Результат boolean Returns `true` on success, else `false`.

dropSchema() публичный Метод

Drops a table.
public dropSchema ( string $source, boolean $soft = true ) : boolean
$source string The table name to drop.
$soft boolean With "soft dropping", the function will retrun `true` even if the table doesn't exists.
Результат boolean `true` on success, `false` otherwise

encoding() абстрактный публичный Метод

Getter/Setter for the connection's encoding Abstract. Must be defined by child class.
abstract public encoding ( mixed $encoding = null ) : mixed.
$encoding mixed
Результат mixed.

error() абстрактный публичный Метод

Abstract. Must be defined by child class.
abstract public error ( )

fields() публичный Метод

Returns a string of formatted fields to be inserted into the query statement.
public fields ( array $fields, object $context ) : string
$fields array Array of fields.
$context object Generally a `data\model\Query` instance.
Результат string A SQL formatted string

group() публичный Метод

Return formatted clause for GROUP BY with known fields escaped.
public group ( string | array $group, object $context ) : string | null
$group string | array The clause to be formatted.
$context object
Результат string | null Formatted clause, `null` if there is nothing to format.

having() публичный Метод

Conversion rules are as follows: - If $key is numeric and $value is a string, $value is treated as a literal SQL fragment and returned.
public having ( string | array $conditions, object $context, array $options = [] ) : string
$conditions string | array The havings for this query.
$context object The current `lithium\data\model\Query` instance.
$options array Available options are: - `'prepend'` _boolean|string_: The string to prepend or `false` for no prepending. Defaults to `'HAVING'`.
Результат string Returns the `HAVING` clause of an SQL query.

join() публичный Метод

Set a query's join according a Relationship.
public join ( object $context, object $rel, string $fromAlias = null, string $toAlias = null, mixed $constraints = [] )
$context object A Query instance
$rel object A Relationship instance
$fromAlias string Set a specific alias for the `'from'` `Model`.
$toAlias string Set a specific alias for `'to'` `Model`.
$constraints mixed If `$constraints` is an array, it will be merged to defaults constraints. If `$constraints` is an object, defaults won't be merged.

joins() публичный Метод

Returns a join statement for given array of query objects
public joins ( array $joins, Query $context ) : string
$joins array A single or array of `lithium\data\model\Query` objects
$context lithium\data\model\Query
Результат string

limit() публичный Метод

Returns a LIMIT statement from the given limit and the offset of the context object.
public limit ( integer $limit, Query $context ) : string
$limit integer
$context lithium\data\model\Query
Результат string

methods() публичный Метод

Determines the set of methods to be used when exporting query values.
public methods ( ) : array
Результат array

name() публичный Метод

Field name handler to ensure proper escaping.
public name ( string $name ) : string
$name string Field or identifier name.
Результат string Returns `$name` quoted according to the rules and quote characters of the database adapter subclass.

on() публичный Метод

Build the ON constraints from a Relationship instance
public on ( object $rel, $aliasFrom = null, $aliasTo = null, array $constraints = [] ) : array
$rel object A Relationship instance
$constraints array Array of additionnal $constraints.
Результат array A constraints array.

order() публичный Метод

Return formatted clause for ORDER BY with known fields escaped and directions normalized to uppercase. When order direction is missing or unrecognized defaults to ASC.
public order ( string | array $order, object $context ) : string | null
$order string | array The clause to be formatted.
$context object
Результат string | null Formatted clause, `null` if there is nothing to format.

read() публичный Метод

Reads records from a database using a lithium\data\model\Query object or raw SQL string.
public read ( string | object $query, array $options = [] ) : mixed
$query string | object `lithium\data\model\Query` object or SQL string.
$options array If `$query` is a raw string, contains the values that will be escaped and quoted. Other options: - `'return'` _string_: switch return between `'array'`, `'item'`, or `'resource'` _string_: Defaults to `'item'`.
Результат mixed Determined by `$options['return']`.

relationship() публичный Метод

Defines or modifies the default settings of a relationship between two models.
public relationship ( string $class, string $type, string $name, array $config = [] ) : array
$class string the primary model of the relationship
$type string the type of the relationship (hasMany, hasOne, belongsTo)
$name string the name of the relationship
$config array relationship options
Результат array Returns an array containing the configuration for a model relationship.

renderCommand() публичный Метод

Returns a given type statement for the given data, rendered from Database::$_strings.
public renderCommand ( string $type, string $data = null, string $context = null ) : string
$type string One of `'create'`, `'read'`, `'update'`, `'delete'` or `'join'`.
$data string The data to replace in the string.
$context string
Результат string

schema() публичный Метод

Builds an array of keyed on the fully-namespaced Model with array of fields as values for the given Query
public schema ( Query $query, Result | null $resource = null, object | null $context = null ) : array
$query lithium\data\model\Query A Query instance.
$resource Result | null An optional a result resource.
$context object | null
Результат array

update() публичный Метод

Updates a record in the database based on the given Query.
public update ( object $query, array $options = [] ) : boolean
$query object A `lithium\data\model\Query` object
$options array none
Результат boolean

value() публичный Метод

Will bypass any formatters and casting - effectively forcing the engine "to keep its hands off" - when $value is an object with the property scalar (created by casting a scalar value to an object i.e. (object) 'foo'). This feature allows to construct values or queries that are not (yet) supported by the engine.
См. также: lithium\data\source\Database::schema()
public value ( mixed $value, array $schema = [] ) : mixed
$value mixed The value to be converted. Arrays will be recursively converted.
$schema array Formatted array from `lithium\data\source\Database::schema()`
Результат mixed value with converted type

Описание свойств

$_cachedNames защищенное свойство

Holds cached names.
protected array $_cachedNames
Результат array

$_classes защищенное свойство

Classes used by Database.
protected array $_classes
Результат array

$_columns защищенное свойство

The supported column types and their default values
protected array $_columns
Результат array

$_constraintTypes защищенное свойство

protected $_constraintTypes

$_operators защищенное свойство

List of SQL operators, paired with handling options.
protected array $_operators
Результат array

$_quotes защищенное свойство

A pair of opening/closing quote characters used for quoting identifiers in SQL queries.
protected array $_quotes
Результат array

$_strategies защищенное свойство

Array of named callable objects representing different strategies for performing specific types of queries.
protected array $_strategies
Результат array

$_strings защищенное свойство

Strings used to render the given statement
См. также: lithium\data\source\Database::renderCommand()
protected array $_strings
Результат array

$connection публичное свойство

Holds the current connection.
public PDO,PD $connection
Результат PD\PDO