1.32 (checked in on 2008/12/03 at 16:32:21 by dries)
Base classes for the database layer.
| Name | Description |
|---|---|
| db_add_field | Add a new field to a table. |
| db_add_index | Add an index. |
| db_add_primary_key | Add a primary key. |
| db_add_unique_key | Add a unique key. |
| db_affected_rows | Determine the number of rows changed by the preceding query. |
| db_change_field | |
| db_column_exists | Check if a column exists in the given table. |
| db_create_table | Create a new table from a Drupal table definition. |
| db_delete | Returns a new DeleteQuery object for the active database. |
| db_distinct_field | Wraps the given table.field entry with a DISTINCT(). The wrapper is added to the SELECT list entry of the given query and the resulting query is returned. This function only applies the wrapper if a DISTINCT doesn't already exist in the query. |
| db_driver | Retrieve the name of the currently active database driver, such as "mysql" or "pgsql". |
| db_drop_field | Drop a field. |
| db_drop_index | Drop an index. |
| db_drop_primary_key | Drop the primary key. |
| db_drop_table | Drop a table. |
| db_drop_unique_key | Drop a unique key. |
| db_escape_table | Restrict a dynamic table, column or constraint name to safe characters. |
| db_fetch_array | |
| db_fetch_object | |
| db_field_names | Return an array of field names from an array of key/index column specifiers. |
| db_field_set_default | Set the default value for a field. |
| db_field_set_no_default | Set a field to have no default value. |
| db_find_tables | Find all tables that are like the specified base table name. |
| db_insert | Returns a new InsertQuery object for the active database. |
| db_is_active | Determine if there is an active connection. |
| db_last_insert_id | Returns the last insert id. |
| db_merge | Returns a new MergeQuery object for the active database. |
| db_placeholders | Generate placeholders for an array of query arguments of a single type. |
| db_query | Execute an arbitrary query string against the active database. |
| db_query_range | Execute an arbitrary query string against the active database, restricted to a specified range. |
| db_query_temporary | Execute a query string against the active database and save the result set to a temp table. |
| db_rename_table | Rename a table. |
| db_result | |
| db_rewrite_sql | Rewrites node, taxonomy and comment queries. Use it for listing queries. Do not use FROM table1, table2 syntax, use JOIN instead. |
| db_select | Returns a new SelectQuery object for the active database. |
| db_set_active | Sets a new active database. |
| db_table_exists | Check if a table exists. |
| db_type_map | This maps a generic data type in combination with its data size to the engine-specific data type. |
| db_type_placeholder | Given a Schema API field type, return the correct %-placeholder. |
| db_update | Returns a new UpdateQuery object for the active database. |
| update_sql | Perform an SQL query and return success or failure. |
| _db_check_install_needed | Redirect the user to the installation script if Drupal has not been installed yet (i.e., if no $databases array has been defined in the settings file) and we are not already there. Otherwise, do nothing. |
| _db_create_keys_sql | |
| _db_error_page | Prints a themed maintenance page with the 'Site offline' text, adding the provided error message in the case of 'display_errors' set to on. Ends the page request; no return. |
| _db_query_process_args | Backward-compatibility utility. |
| _db_rewrite_sql | Helper function for db_rewrite_sql. |