[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/data/ -> data.module (summary)

(no description)

File Size: 465 lines (12 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

DataException:: (0 methods):

Defines 0 functions

  data_views_api()
  data_schema_alter()
  data_create_table()
  data_get_table()
  data_drop_table()
  data_get_all_tables()
  data_get_handler()
  data_get_field_definitions()
  data_get_field_definition()
  data_get_field_types()
  data_get_field_sizes()
  data_get_pk_definition()
  data_get_index_definition()
  data_name()
  data_safe_name()
  data_natural_name()
  data_build_schema()
  data_build_field_definition()
  data_export()
  _data_load_table()
  data_alter_table()
  _data_override()
  data_include()

Class: DataException  - X-Ref

Base class for any exceptions thrown in Data.

Functions
Functions that are not part of a class:

data_views_api()   X-Ref
Implementation of hook_views_api().


data_schema_alter(&$schema)   X-Ref
Implementation of hook_schema_alter().

This is a central piece of data module:
Here we tack schema information that has been defined through the API in data_tables
or by hook_data_default onto the $schema array.

We do not use hook_schema() for exposing schema information as this would cause a race
condition: ctools/exports looks for data module's data_tables at the same time when
we are actually rebuilding it - follow path through
data_get_all_tables() ... _data_load_table() ... ctools_export_load_object().

data_create_table($name, $schema, $title = NULL)   X-Ref
Create a table.

param: $name
param: $schema
param: $title
return:

data_get_table($name)   X-Ref
Get a table if it exists.

param: $name
return:

data_drop_table($name)   X-Ref


data_get_all_tables($reset = FALSE)   X-Ref
Load all data tables.


data_get_handler($table_name)   X-Ref
Get Data handler for a table.

param: $table_name
return:

data_get_field_definitions()   X-Ref
Get a list of supported field definitions.

This list is a sub set of Schema API data types
http://drupal.org/node/159605
The keys are simplified handles.

data_get_field_definition($key)   X-Ref
Get a definition key into a schema API type definition.

If no type can be found, FALSE will be returned.

data_get_field_types()   X-Ref
Get schema API field types supported by Data module.


data_get_field_sizes()   X-Ref
Get schema API field sizes.


data_get_pk_definition($field_name, $spec)   X-Ref
Get a Schema API PK definition for a given field type.


data_get_index_definition($field_name, $spec)   X-Ref
Get a Schema API index definition for a given field type.


data_name($table)   X-Ref
Create a table name in the data namespace.


data_safe_name($name)   X-Ref
Create a safe name for MySQL field or table names.


data_natural_name($name)   X-Ref
Helper function to create a natural name.
underscored_name -> Underscored name


data_build_schema($keys)   X-Ref
Helper function to generate a schema.

Example:
$table->create(data_build_schema($keys));


data_build_field_definition($stub)   X-Ref
Build a full schema api field definition.

param: $stub

data_export($name, $indent = '')   X-Ref
Export a data table. This does not export the content of a table - only its schema
and any meta information (title, name, meta...).

param: $name
return:

_data_load_table($name = NULL, $reset = FALSE)   X-Ref
Loads data table info from the database.


data_alter_table($table, $field_reason)   X-Ref
Helper function for adjusting a table's real schema.


_data_override($name)   X-Ref
Starts overriding a data table by copying it from the default definition into the DB.
This function does not have any effect if called on a table that does already exist in
data_tables.


data_include($class)   X-Ref
Include class file.




Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7