Database Driver.
package | core_database_drivers |
---|
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, boolean $if_not_exists = 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
boolean
Whether to only do it if it does not currently exist
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_name, 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 (null: failed)db_get_first_id() : integer
integer
First ID useddb_get_type_remap() : array
array
The mapdb_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, \?integer $max= null
, \?integer $start= null
, boolean $fail_ok= false
, boolean $get_insert_id= false
, boolean $no_syndicate= false
, boolean $save_as_volatile= 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 not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
boolean
Whether to get the autoincrement ID created for an insert query
boolean
Whether to force the query to execute on the XML database driver (won't optimise by using MySQL). Useful for calls happening for multi-part queries from within this DB driver
boolean
Whether we are saving as a 'volatile' file extension
\?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 SQLis_start_of_delimiter(string $looking) : boolean
string
The item
boolean
Whether it is_bad_query(string $query, boolean $fail_ok= false
, \?string $error= null
) : \?mixed
string
The query that failed
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?string
Error message (null: none)
\?mixed
Always returns null (null: error)_delete_record(\PATH $path, array $db)
\PATH
The file path
array
Database connection
_do_query_alter(array $tokens, string $query, array $db, boolean $fail_ok) : \?mixed
array
Tokens
string
Query that was executed
array
Database connection
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?mixed
The results (null: no results)_do_query_create(array $tokens, string $query, array $db, boolean $fail_ok) : \?mixed
array
Tokens
string
Query that was executed
array
Database connection
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?mixed
The results (null: no results)_do_query_delete(array $tokens, string $query, array $db, \?integer $max, \?integer $start, boolean $fail_ok) : \?mixed
array
Tokens
string
Query that was executed
array
Database connection
\?integer
The maximum number of rows to affect (null: no limit)
\?integer
The start row to affect (null: no specification)
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?mixed
The results (null: no results)_do_query_drop(array $tokens, string $query, array $db, boolean $fail_ok) : \?mixed
array
Tokens
string
Query that was executed
array
Database connection
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?mixed
The results (null: no results)_do_query_insert(array $tokens, string $query, array $db, boolean $fail_ok, boolean $get_insert_id, \?integer $random_key, boolean $save_as_volatile = false
) : \?mixed
array
Tokens
string
Query that was executed
array
Database connection
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
boolean
Whether to get the autoincrement ID created for an insert query
\?integer
The random key that we would use (null: not generated yet)
boolean
Whether we are saving as a 'volatile' file extension
\?mixed
The insert ID (null: not requested / error)_do_query_insert__execute(array $inserts, \ID_TEXT $table_name, string $query, array $db, boolean $fail_ok, boolean $get_insert_id, \?integer $random_key, boolean $save_as_volatile = false
) : \?mixed
array
Rows being inserted
\ID_TEXT
Table name we're inserting into
string
Query that was executed
array
Database connection
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
boolean
Whether to get the autoincrement ID created for an insert query
\?integer
The random key that we would use (null: not generated yet)
boolean
Whether we are saving as a 'volatile' file extension
\?mixed
The insert ID (null: not requested / error)_do_query_insert__parse(array $tokens, string $query, array $db, boolean $fail_ok) : \?array
array
Tokens
string
Query that was executed
array
Database connection
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?array
A pair: the table, and the rows to insert (null: error)_do_query_select(array $tokens, string $query, array $db, \?integer $max, \?integer $start, boolean $fail_ok, integer $at, boolean $do_end_check = true
) : \?mixed
array
Tokens
string
Query that was executed
array
Database connection
\?integer
The maximum number of rows to affect (null: no limit)
\?integer
The start row to affect (null: no specification)
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
integer
Our offset counter
boolean
Whether to not do the check to make sure we've parsed everything
\?mixed
The results (null: no results)_do_query_update(array $tokens, string $query, array $db, \?integer $max, \?integer $start, boolean $fail_ok) : \?mixed
array
Tokens
string
Query that was executed
array
Database connection
\?integer
The maximum number of rows to affect (null: no limit)
\?integer
The start row to affect (null: no specification)
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?mixed
The results (null: no results)_escape_name(string $in) : string
string
Value to escape (original value)
string
Escaped value_execute_expression(array $expr, array $bindings, string $query) : \?mixed
array
The expression
array
Bindings available in the execution scope
string
Query that was executed
\?mixed
The result (null: error/NULL)_execute_join(array $db, string $joined_as_prior, array $join, string $query, array $records, array $schema, array $where_expr, boolean $fail_ok = false
) : \?array
array
Database connection
string
The renaming of our table, so we can recognise it in the join condition
array
Join op-tree
string
Query that was executed
array
Records so far
array
Schema so far
array
Expression filtering results (used for optimisation, seeing if we can get a quick key match)
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?array
A pair: an array of results, an array of the schema for what has been joined (null: error)_function_set_scoping(array $set, array $select, array $rep, string $query) : array
array
The set of results we are operating on
array
Parse tree of what we are selecting
array
Record we are copying the function results into
string
Query that was executed
array
The result row based on the set_guid(\?array $schema= null
, \?array $record= null
) : string
\?array
The schema (null: don't have/use)
\?array
The record (null: don't have/use)
string
The GUID_key_conflict_check(array $db, string $table_name, array $schema, array $record, string $query, boolean $fail_ok, \?string $existing_identity = null
) : boolean
array
Database connection
string
The table name
array
The schema
array
The record
string
Query that was executed
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?string
The GUID representing what we have now (so we don't think we're conflicting with ourself) (null: not yet added)
boolean
Whether there was a conflict_parsing_check_ended(integer $at, array $tokens, string $query, boolean $fail_ok = false
) : boolean
integer
Our offset counter
array
Tokens
string
Query that was executed
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
boolean
Success status_parsing_expects(integer $at, array $tokens, string $token, string $query, boolean $fail_ok = false
) : boolean
integer
Our offset counter
array
Tokens
string
Token expected
string
Query that was executed
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
boolean
Success status_parsing_read(integer $at, array $tokens, string $query, boolean $fail_ok = false
) : \?string
integer
Our offset counter
array
Tokens
string
Query that was executed
boolean
Whether it can return NULL if we're out of output (otherwise fails)
\?string
Token read (null: error, read too far)_parsing_read_expression(integer $at, array $tokens, string $query, array $db, boolean $look_for_connectives= true
, boolean $look_for_any_connectives= true
, boolean $fail_ok= false
) : \?array
integer
Our offset counter
array
Tokens
string
Query that was executed
array
Database connection
boolean
Whether to work as a connection point to seek out logic connection expression parts
boolean
Whether to work as a connection point to seek out arithmetic connection expression parts
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?array
The expression (null: error)_read_all_records(array $db, string $table_name, string $table_as, \?array $schema, \?array $where_expr, boolean $fail_ok, string $query, boolean $include_unused_fields = false
) : \?array
array
Database connection
string
The table name
string
What the table will be renamed to (blank: N/A)
\?array
Schema to type-set against (null: do not do type-setting)
\?array
Expression filtering results (used for optimisation, seeing if we can get a quick key match) (null: no data to filter with)
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
string
Query that was executed
boolean
Whether to include fields that are present in the actual records but not in our schema
\?array
The collected records (null: error)_read_join(integer $at, array $tokens, string $query, array $db, boolean $fail_ok, integer $closing_brackets_needed) : \?array
integer
Our offset counter
array
Tokens
string
Query that was executed
array
Database connection
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
integer
How many closing brackets we expect
\?array
Join condition (null: no join here)_read_record(\PATH $path, \?array $schema= null
, \?array $must_contain_strings= null
, boolean $include_unused_fields= false
) : \?array
\PATH
The file path
\?array
Schema to type-set against (null: do not do type-setting)
\?array
Substrings to check it is in, used for performance (null: none)
boolean
Whether to include fields that are present in the actual records but not in our schema
\?array
The record map (null: does not contain requested substrings)_read_schema(array $db, string $table_name, boolean $fail_ok = false
) : \?array
array
The database
string
The table name
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?array
The schema map (null: not found)_setify_join_condition_for_optimisation(array $join_condition, array $schema, array $records, string $joined_as) : array
array
Join condition (parsed WHERE-style clause)
array
Schema so far
array
Records so far
string
The renaming of our table, so we can recognise it in the join condition
array
Altered join condition_turn_where_expr_to_map(array $where_expr, string $table_as, \?array $schema= null
, boolean $not_full_accuracy= false
) : array
array
The expression parse tree
string
What the table will be renamed to (blank: N/A)
\?array
Schema to type-set against (null: do not do type-setting)
boolean
Whether to do a not-full-accurate search
array
AND map_type_check(array $schema, array $record, string $query)
array
The schema
array
The data
string
Query that was executed
_unescape_name(string $in) : string
string
Escaped value
string
Original value_write_record(array $db, string $table_name, string $guid, array $record, boolean $fail_ok= false
, boolean $save_as_volatile= false
)
array
Database connection
string
The table name
string
The GUID
array
The record map
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
boolean
Whether we are saving as a 'volatile' file extension
_write_records(array $db, string $table_name, array $records, boolean $fail_ok = false
)
array
Database connection
string
The table name
array
The list of record maps
boolean
Whether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)