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 Backdrop system variable 'field_storage_default' identifies the storage backend used by default.
See Field API for information about the other parts of the Field API.
File
- core/
modules/ field/ field.attach.inc, line 7 - Field attach API, allowing entities (nodes, users, ...) to be 'fieldable'.
Functions
Name | Location | Description |
---|---|---|
hook_field_storage_create_field |
core/ |
Act on creation of a new field. |
hook_field_storage_delete |
core/ |
Delete all field data for an entity. |
hook_field_storage_delete_field |
core/ |
Act on deletion of a field. |
hook_field_storage_delete_instance |
core/ |
Act on deletion of a field instance. |
hook_field_storage_delete_revision |
core/ |
Delete a single revision of field data for an entity. |
hook_field_storage_details |
core/ |
Reveal the internal details about the storage for a field. |
hook_field_storage_details_alter |
core/ |
Perform alterations on Field API storage details. |
hook_field_storage_info |
core/ |
Expose Field API storage backends. |
hook_field_storage_info_alter |
core/ |
Perform alterations on Field API storage types. |
hook_field_storage_load |
core/ |
Load field data for a set of entities. |
hook_field_storage_pre_insert |
core/ |
Act before the storage backends insert field data. |
hook_field_storage_pre_load |
core/ |
Act before the storage backends load field data. |
hook_field_storage_pre_update |
core/ |
Act before the storage backends update field data. |
hook_field_storage_purge |
core/ |
Remove field storage information when field data is purged. |
hook_field_storage_purge_field |
core/ |
Remove field storage information when a field record is purged. |
hook_field_storage_purge_field_instance |
core/ |
Remove field storage information when a field instance is purged. |
hook_field_storage_query |
core/ |
Execute an EntityFieldQuery. |
hook_field_storage_write |
core/ |
Write field data for an entity. |
Constants
Name | Location | Description |
---|---|---|
FIELD_STORAGE_INSERT |
core/ |
Argument for an insert operation. |
FIELD_STORAGE_UPDATE |
core/ |
Argument for an update operation. |