| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 553 lines (15 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
DataTable:: (25 methods):
instance()
__construct()
create()
adopt()
defined()
get()
update()
compareSchema()
addField()
addIndex()
dropIndex()
addUniqueKey()
dropUniqueKey()
changeIndex()
addPrimaryKey()
dropPrimaryKey()
changePrimaryKey()
changeField()
dropField()
drop()
revert()
link()
unlink()
handler()
clearCaches()
| instance($name) X-Ref |
| Instiate a DataTable object. Use this function instead of new DataTable. |
| __construct($name) X-Ref |
| Constructor. Do not call directly, but use DataTable::instance($name) instead. |
| create($table_schema) X-Ref |
| Create a table. Do not call directly but use data_create_table() instead. |
| adopt() X-Ref |
| Let Data manage a table that already exists in the database. Uses the $name property of the object to determine which database table to adopt. return: |
| defined() X-Ref |
| Determine whether a table is defined. return: |
| get($property) X-Ref |
| Get a property of the DataTable object. param: $property return: |
| update($properties) X-Ref |
| Update table properties. param: $properties |
| compareSchema() X-Ref |
| Compare this table's schema to schema of table in DB. Requires schema module. return: |
| addField($field, $spec) X-Ref |
| Add a field. |
| addIndex($field) X-Ref |
| Add an index to table. |
| dropIndex($field) X-Ref |
| Drop an index from a table. |
| addUniqueKey($field) X-Ref |
| Add a unique key to a field. |
| dropUniqueKey($field) X-Ref |
| Drop a unique key from a table. |
| changeIndex($fields) X-Ref |
| Change indexes of a table. |
| addPrimaryKey($fields) X-Ref |
| Add a primary key to table. |
| dropPrimaryKey() X-Ref |
| Drop all primary keys from a table. |
| changePrimaryKey($fields) X-Ref |
| Change the primary keys of a table. |
| changeField($field, $spec) X-Ref |
| Change a field. |
| dropField($field) X-Ref |
| Delete a field. |
| drop() X-Ref |
| Drop a table. Does not drop a table if its defined in code. return: |
| revert() X-Ref |
| Revert a table to its definition in code. Does not revert a table if it is not defined in code. return: |
| link($left_table, $left_field, $field = NULL, $inner_join = TRUE) X-Ref |
| Link this table to another table. Linking a table to another one is to define how data in these tables should be joined to each other. There can be more than one link to the left of a table. However, for views integration, only the first join created will be used. |
| unlink($left_table) X-Ref |
| Unlink this table from another table. |
| handler() X-Ref |
| Convenience method. |
| clearCaches() X-Ref |
| Clear relevant caches. Call after operations that create, delete or modify tables. |
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |