Field Storage API
Implement a storage engine for Field API data.
The Field Attach API uses the Field Storage API to perform all "database access". Each Field Storage API hook function defines a primitive database operation such as read, write, or delete. The default field storage module, field_sql_storage.module, uses the local SQL database to implement these operations, but alternative field storage backends can choose to represent the data in SQL differently or use a completely different storage mechanism such as a cloud-based database.
Each field defines which storage backend it uses. The Drupal system variable 'field_default_storage' identifies the storage backend used by default.
Constants
| Name | Location | Description |
|---|---|---|
| FIELD_STORAGE_INSERT | modules/field/field.attach.inc | Argument for an insert operation. |
| FIELD_STORAGE_UPDATE | modules/field/field.attach.inc | Argument for an update operation. |
Functions
| Name | Location | Description |
|---|---|---|
| hook_field_storage_create_field | modules/field/field.api.php | Act on creation of a new field. |
| hook_field_storage_delete | modules/field/field.api.php | Delete all field data for an object. |
| hook_field_storage_delete_field | modules/field/field.api.php | Act on deletion of a field. |
| hook_field_storage_delete_instance | modules/field/field.api.php | Act on deletion of a field instance. |
| hook_field_storage_delete_revision | modules/field/field.api.php | Delete a single revision of field data for an object. |
| hook_field_storage_details | modules/field/field.api.php | Reveal the internal details about the storage for a field. |
| hook_field_storage_details_alter | modules/field/field.api.php | Perform alterations on Field API storage details. |
| hook_field_storage_info | modules/field/field.api.php | Expose Field API storage backends. |
| hook_field_storage_info_alter | modules/field/field.api.php | Perform alterations on Field API storage types. |
| hook_field_storage_load | modules/field/field.api.php | Load field data for a set of objects. |
| hook_field_storage_pre_insert | modules/field/field.api.php | Act before the storage backends insert field data. |
| hook_field_storage_pre_load | modules/field/field.api.php | Act before the storage backends load field data. |
| hook_field_storage_pre_query | modules/field/field.api.php | Act before the storage backend runs the query. |
| hook_field_storage_pre_update | modules/field/field.api.php | Act before the storage backends update field data. |
| hook_field_storage_query | modules/field/field.api.php | Handle a field query. |
| hook_field_storage_write | modules/field/field.api.php | Write field data for an object. |
