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

NameLocationDescription
FIELD_STORAGE_INSERTmodules/field/field.attach.incArgument for an insert operation.
FIELD_STORAGE_UPDATEmodules/field/field.attach.incArgument for an update operation.

Functions

NameLocationDescription
hook_field_storage_create_fieldmodules/field/field.api.phpAct on creation of a new field.
hook_field_storage_deletemodules/field/field.api.phpDelete all field data for an object.
hook_field_storage_delete_fieldmodules/field/field.api.phpAct on deletion of a field.
hook_field_storage_delete_instancemodules/field/field.api.phpAct on deletion of a field instance.
hook_field_storage_delete_revisionmodules/field/field.api.phpDelete a single revision of field data for an object.
hook_field_storage_detailsmodules/field/field.api.phpReveal the internal details about the storage for a field.
hook_field_storage_details_altermodules/field/field.api.phpPerform alterations on Field API storage details.
hook_field_storage_infomodules/field/field.api.phpExpose Field API storage backends.
hook_field_storage_info_altermodules/field/field.api.phpPerform alterations on Field API storage types.
hook_field_storage_loadmodules/field/field.api.phpLoad field data for a set of objects.
hook_field_storage_pre_insertmodules/field/field.api.phpAct before the storage backends insert field data.
hook_field_storage_pre_loadmodules/field/field.api.phpAct before the storage backends load field data.
hook_field_storage_pre_querymodules/field/field.api.phpAct before the storage backend runs the query.
hook_field_storage_pre_updatemodules/field/field.api.phpAct before the storage backends update field data.
hook_field_storage_querymodules/field/field.api.phpHandle a field query.
hook_field_storage_writemodules/field/field.api.phpWrite field data for an object.
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.