database.inc
Version 1.81 (checked in on 2009/10/18 at 06:56:24 by webchick)
Base classes for the database layer.
Functions
| 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_change_field | Change a field definition. |
| db_close | Closes the active database connection. |
| 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_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_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_ignore_slave | Helper function to get duration lag from variable and set the session variable that contains the lag. |
| db_insert | Returns a new InsertQuery object for the active database. |
| db_is_active | Determine if there is an active connection. |
| db_merge | Returns a new MergeQuery object for the active database. |
| db_next_id | Retrieves a unique id. |
| 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_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_transaction | Returns a new transaction object for the active database. |
| db_truncate | Returns a new TruncateQuery object for the active database. |
| db_type_map | This maps a generic data type in combination with its data size to the engine-specific data type. |
| db_update | Returns a new UpdateQuery object for the active database. |
| _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. |
