Database Driver.
package | core_database_drivers |
---|---|
inherited_from | \Database_super_mysql |
can_arbitrary_groupby() : boolean
boolean
Whether it candb_change_primary_key(\ID_TEXT $table_name, array $new_key, array $db)
\ID_TEXT
The name of the table to create the index on
array
A list of fields to put in the new key
array
The DB connection to make on
db_close_connections()
db_create_index(\ID_TEXT $table_name, \ID_TEXT $index_name, string $_fields, array $db)
\ID_TEXT
The name of the table to create the index on
\ID_TEXT
The index name (not really important at all)
string
Part of the SQL query: a comma-separated list of fields to use on the index
array
The DB connection to make on
db_create_table(\ID_TEXT $table_name, array $fields, array $db, \ID_TEXT $raw_table_name, boolean $save_bytes = false
)
\ID_TEXT
The table name
array
A map of field names to Composr field types (with *#? encodings)
array
The DB connection to make on
\ID_TEXT
The table name with no table prefix
boolean
Whether to use lower-byte table storage, with tradeoffs of not being able to support all unicode characters; use this if key length is an issue
db_default_password() : string
string
The default password for db connectionsdb_default_user() : string
string
The default user for db connectionsdb_drop_table_if_exists(\ID_TEXT $table, array $db)
\ID_TEXT
The table name
array
The DB connection to delete on
db_empty_is_null() : boolean
boolean
Whether a blank string IS NULLdb_encode_like(string $pattern) : string
string
The pattern
string
The encoded patterndb_escape_string(string $string) : string
string
The string
string
The escaped stringdb_full_text_assemble(string $content, boolean $boolean) : string
string
Our match string (assumes "?" has been stripped already)
boolean
Whether to do a boolean full text search
string
Part of a WHERE clause for doing full-text searchdb_get_connection(boolean $persistent, string $db_name, string $db_host, string $db_user, string $db_password, boolean $fail_ok = false
) : \?array
boolean
Whether to create a persistent connection
string
The database name
string
The database host (the server)
string
The database connection username
string
The database connection password
boolean
Whether to on error echo an error and return with a NULL, rather than giving a critical error
\?array
A database connection (note for MySQL, it's actually a pair, containing the database name too: because we need to select the name before each query on the connection) (null: error)db_get_first_id() : integer
integer
First ID useddb_get_query_rows(object $results) : array
object
The query result pointer
array
A list of row mapsdb_get_type_remap() : array
array
The mapdb_has_collate_settings(array $db) : boolean
array
A DB connection
boolean
Whether it isdb_has_expression_ordering(array $db) : boolean
array
A DB connection
boolean
Whether it isdb_has_full_text(array $db) : boolean
array
A DB connection
boolean
Whether it isdb_has_full_text_boolean() : boolean
boolean
Whether it isdb_has_subqueries(array $db) : boolean
array
A DB connection
boolean
Whether it isdb_is_flat_file_simple() : boolean
boolean
Whether the database is a flat file databasedb_query(string $query, array $db_parts, \?integer $max= null
, \?integer $start= null
, boolean $fail_ok= false
, boolean $get_insert_id= false
) : \?mixed
string
The complete SQL query
array
A DB connection
\?integer
The maximum number of rows to affect (null: no limit)
\?integer
The start row to affect (null: no specification)
boolean
Whether to output an error on failure
boolean
Whether to get the autoincrement ID created for an insert query
\?mixed
The results (null: no results), or the insert IDdb_string_equal_to(\ID_TEXT $attribute, string $compare) : string
\ID_TEXT
The attribute
string
The comparison
string
The SQLdb_string_not_equal_to(\ID_TEXT $attribute, string $compare) : string
\ID_TEXT
The attribute
string
The comparison
string
The SQLusing_innodb() : boolean
boolean
Answer$cache_db
array()
$last_select_db
null