Database Driver.
| package | core_database_drivers |
|---|
can_arbitrary_groupby() : boolean
booleanWhether it candb_change_primary_key(\ID_TEXT $table_name, array $new_key, array $db)
\ID_TEXTThe name of the table to create the index on
arrayA list of fields to put in the new key
arrayThe DB connection to make on
db_close_connections()
db_create_index(\ID_TEXT $table_name, \ID_TEXT $index_name, string $_fields, array $db)
\ID_TEXTThe name of the table to create the index on
\ID_TEXTThe index name (not really important at all)
stringPart of the SQL query: a comma-separated list of fields to use on the index
arrayThe DB connection to make on
db_create_table(\ID_TEXT $table_name, array $fields, array $db, boolean $if_not_exists = false)
\ID_TEXTThe table name
arrayA map of field names to Composr field types (with *#? encodings)
arrayThe DB connection to make on
booleanWhether to only do it if it does not currently exist
db_default_password() : string
stringThe default password for db connectionsdb_default_user() : string
stringThe default user for db connectionsdb_drop_table_if_exists(\ID_TEXT $table_name, array $db)
\ID_TEXTThe table name
arrayThe DB connection to delete on
db_empty_is_null() : boolean
booleanWhether a blank string IS NULLdb_encode_like(string $pattern) : string
stringThe pattern
stringThe encoded patterndb_escape_string(string $string) : string
stringThe string
stringThe escaped stringdb_full_text_assemble(string $content, boolean $boolean) : string
stringOur match string (assumes "?" has been stripped already)
booleanWhether to do a boolean full text search
stringPart 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
booleanWhether to create a persistent connection
stringThe database name
stringThe database host (the server)
stringThe database connection username
stringThe database connection password
booleanWhether to on error echo an error and return with a NULL, rather than giving a critical error
\?arrayA database connection (null: failed)db_get_first_id() : integer
integerFirst ID useddb_get_type_remap() : array
arrayThe mapdb_has_full_text(array $db) : boolean
arrayA DB connection
booleanWhether it isdb_has_full_text_boolean() : boolean
booleanWhether it isdb_has_subqueries(array $db) : boolean
arrayA DB connection
booleanWhether it isdb_is_flat_file_simple() : boolean
booleanWhether 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
stringThe complete SQL query
arrayA DB connection
\?integerThe maximum number of rows to affect (null: no limit)
\?integerThe start row to affect (null: no specification)
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
booleanWhether to get the autoincrement ID created for an insert query
booleanWhether 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
booleanWhether we are saving as a 'volatile' file extension
\?mixedThe results (null: no results), or the insert IDdb_string_equal_to(\ID_TEXT $attribute, string $compare) : string
\ID_TEXTThe attribute
stringThe comparison
stringThe SQLdb_string_not_equal_to(\ID_TEXT $attribute, string $compare) : string
\ID_TEXTThe attribute
stringThe comparison
stringThe SQLis_start_of_delimiter(string $looking) : boolean
stringThe item
booleanWhether it is_bad_query(string $query, boolean $fail_ok= false, \?string $error= null) : \?mixed
stringThe query that failed
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?stringError message (null: none)
\?mixedAlways returns null (null: error)_delete_record(\PATH $path, array $db)
\PATHThe file path
arrayDatabase connection
_do_query_alter(array $tokens, string $query, array $db, boolean $fail_ok) : \?mixed
arrayTokens
stringQuery that was executed
arrayDatabase connection
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?mixedThe results (null: no results)_do_query_create(array $tokens, string $query, array $db, boolean $fail_ok) : \?mixed
arrayTokens
stringQuery that was executed
arrayDatabase connection
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?mixedThe results (null: no results)_do_query_delete(array $tokens, string $query, array $db, \?integer $max, \?integer $start, boolean $fail_ok) : \?mixed
arrayTokens
stringQuery that was executed
arrayDatabase connection
\?integerThe maximum number of rows to affect (null: no limit)
\?integerThe start row to affect (null: no specification)
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?mixedThe results (null: no results)_do_query_drop(array $tokens, string $query, array $db, boolean $fail_ok) : \?mixed
arrayTokens
stringQuery that was executed
arrayDatabase connection
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?mixedThe 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
arrayTokens
stringQuery that was executed
arrayDatabase connection
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
booleanWhether to get the autoincrement ID created for an insert query
\?integerThe random key that we would use (null: not generated yet)
booleanWhether we are saving as a 'volatile' file extension
\?mixedThe 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
arrayRows being inserted
\ID_TEXTTable name we're inserting into
stringQuery that was executed
arrayDatabase connection
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
booleanWhether to get the autoincrement ID created for an insert query
\?integerThe random key that we would use (null: not generated yet)
booleanWhether we are saving as a 'volatile' file extension
\?mixedThe insert ID (null: not requested / error)_do_query_insert__parse(array $tokens, string $query, array $db, boolean $fail_ok) : \?array
arrayTokens
stringQuery that was executed
arrayDatabase connection
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?arrayA 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
arrayTokens
stringQuery that was executed
arrayDatabase connection
\?integerThe maximum number of rows to affect (null: no limit)
\?integerThe start row to affect (null: no specification)
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
integerOur offset counter
booleanWhether to not do the check to make sure we've parsed everything
\?mixedThe results (null: no results)_do_query_update(array $tokens, string $query, array $db, \?integer $max, \?integer $start, boolean $fail_ok) : \?mixed
arrayTokens
stringQuery that was executed
arrayDatabase connection
\?integerThe maximum number of rows to affect (null: no limit)
\?integerThe start row to affect (null: no specification)
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?mixedThe results (null: no results)_escape_name(string $in) : string
stringValue to escape (original value)
stringEscaped value_execute_expression(array $expr, array $bindings, string $query) : \?mixed
arrayThe expression
arrayBindings available in the execution scope
stringQuery that was executed
\?mixedThe 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
arrayDatabase connection
stringThe renaming of our table, so we can recognise it in the join condition
arrayJoin op-tree
stringQuery that was executed
arrayRecords so far
arraySchema so far
arrayExpression filtering results (used for optimisation, seeing if we can get a quick key match)
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?arrayA 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
arrayThe set of results we are operating on
arrayParse tree of what we are selecting
arrayRecord we are copying the function results into
stringQuery that was executed
arrayThe result row based on the set_guid(\?array $schema= null, \?array $record= null) : string
\?arrayThe schema (null: don't have/use)
\?arrayThe record (null: don't have/use)
stringThe GUID_key_conflict_check(array $db, string $table_name, array $schema, array $record, string $query, boolean $fail_ok, \?string $existing_identity = null) : boolean
arrayDatabase connection
stringThe table name
arrayThe schema
arrayThe record
stringQuery that was executed
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?stringThe GUID representing what we have now (so we don't think we're conflicting with ourself) (null: not yet added)
booleanWhether there was a conflict_parsing_check_ended(integer $at, array $tokens, string $query, boolean $fail_ok = false) : boolean
integerOur offset counter
arrayTokens
stringQuery that was executed
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
booleanSuccess status_parsing_expects(integer $at, array $tokens, string $token, string $query, boolean $fail_ok = false) : boolean
integerOur offset counter
arrayTokens
stringToken expected
stringQuery that was executed
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
booleanSuccess status_parsing_read(integer $at, array $tokens, string $query, boolean $fail_ok = false) : \?string
integerOur offset counter
arrayTokens
stringQuery that was executed
booleanWhether it can return NULL if we're out of output (otherwise fails)
\?stringToken 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
integerOur offset counter
arrayTokens
stringQuery that was executed
arrayDatabase connection
booleanWhether to work as a connection point to seek out logic connection expression parts
booleanWhether to work as a connection point to seek out arithmetic connection expression parts
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?arrayThe 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
arrayDatabase connection
stringThe table name
stringWhat the table will be renamed to (blank: N/A)
\?arraySchema to type-set against (null: do not do type-setting)
\?arrayExpression filtering results (used for optimisation, seeing if we can get a quick key match) (null: no data to filter with)
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
stringQuery that was executed
booleanWhether to include fields that are present in the actual records but not in our schema
\?arrayThe collected records (null: error)_read_join(integer $at, array $tokens, string $query, array $db, boolean $fail_ok, integer $closing_brackets_needed) : \?array
integerOur offset counter
arrayTokens
stringQuery that was executed
arrayDatabase connection
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
integerHow many closing brackets we expect
\?arrayJoin condition (null: no join here)_read_record(\PATH $path, \?array $schema= null, \?array $must_contain_strings= null, boolean $include_unused_fields= false) : \?array
\PATHThe file path
\?arraySchema to type-set against (null: do not do type-setting)
\?arraySubstrings to check it is in, used for performance (null: none)
booleanWhether to include fields that are present in the actual records but not in our schema
\?arrayThe record map (null: does not contain requested substrings)_read_schema(array $db, string $table_name, boolean $fail_ok = false) : \?array
arrayThe database
stringThe table name
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
\?arrayThe schema map (null: not found)_setify_join_condition_for_optimisation(array $join_condition, array $schema, array $records, string $joined_as) : array
arrayJoin condition (parsed WHERE-style clause)
arraySchema so far
arrayRecords so far
stringThe renaming of our table, so we can recognise it in the join condition
arrayAltered join condition_turn_where_expr_to_map(array $where_expr, string $table_as, \?array $schema= null, boolean $not_full_accuracy= false) : array
arrayThe expression parse tree
stringWhat the table will be renamed to (blank: N/A)
\?arraySchema to type-set against (null: do not do type-setting)
booleanWhether to do a not-full-accurate search
arrayAND map_type_check(array $schema, array $record, string $query)
arrayThe schema
arrayThe data
stringQuery that was executed
_unescape_name(string $in) : string
stringEscaped value
stringOriginal value_write_record(array $db, string $table_name, string $guid, array $record, boolean $fail_ok= false, boolean $save_as_volatile= false)
arrayDatabase connection
stringThe table name
stringThe GUID
arrayThe record map
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)
booleanWhether we are saving as a 'volatile' file extension
_write_records(array $db, string $table_name, array $records, boolean $fail_ok = false)
arrayDatabase connection
stringThe table name
arrayThe list of record maps
booleanWhether to not output an error on some kind of run-time failure (parse errors and clear programming errors are always fatal)