![]() |
Xataface 2.0
Xataface Application Framework
|
Public Member Functions | |
Dataface_MetadataTool ($tablename) | |
isMetadataTable ($tablename=null) | |
& | getColumns ($tablename=null, $usecache=true) |
& | getKeyColumns ($tablename=null, $usecache=true) |
loadMetadataFieldDefs ($tablename=null) | |
createMetadataTable ($tablename=null) | |
refreshMetadataTable ($tablename=null) | |
Data Fields | |
$fieldDefs = null | |
$tablename = null | |
$columns = null | |
$keyColumns = null |
A tool for managing table metadata. Meta data can be any data that describes a record but is not part of the record itself. This is handy for storing workflow information about records such as translation status. Generally metadata for a given table is stored in a separate table named tablename__metadata where 'tablename' is the name of the table described by the metadata.
Definition at line 14 of file MetadataTool.php.
createMetadataTable | ( | $ | tablename = null | ) |
Creates a table to store the metadata for the given table.
string | $tablename | The name of the table for which the metadata is to be stored. |
Definition at line 143 of file MetadataTool.php.
Dataface_MetadataTool | ( | $ | tablename | ) |
Definition at line 39 of file MetadataTool.php.
& getColumns | ( | $ | tablename = null , |
$ | usecache = true |
||
) |
Gets the column definitions of the metadata table as produced by show columns SQL query.
string | $tablename | The name of the subject table. |
boolean | $usecache | Whether to use cached results or to forcefully obtain up-to-date data. |
Definition at line 61 of file MetadataTool.php.
& getKeyColumns | ( | $ | tablename = null , |
$ | usecache = true |
||
) |
Returns the columns of this metadata table that are part of the primary key.
string | $tablename | The name of the subject table. |
boolean | $usecache | Whether to use cached results or to force a new call to show columns |
Definition at line 88 of file MetadataTool.php.
isMetadataTable | ( | $ | tablename = null | ) |
Checks a table name to see if it is a metadata table. A metadata table always ends in '__metadata'.
string | $tablename | The name of the table to check. |
Definition at line 49 of file MetadataTool.php.
loadMetadataFieldDefs | ( | $ | tablename = null | ) |
Loads the field definitions for meta data for the given table. These are defined in the metadata.ini files at the table, application, and dataface levels.
Definition at line 112 of file MetadataTool.php.
refreshMetadataTable | ( | $ | tablename = null | ) |
Refreshes the metadata table for a given table. This means that missing columns and keys are created so that the schema matches the schema of the current table structure.
string | $tablename | The name of the table for which the metadata is being stored. |
Definition at line 188 of file MetadataTool.php.
$columns = null |
Definition at line 31 of file MetadataTool.php.
$fieldDefs = null |
Definition at line 20 of file MetadataTool.php.
$keyColumns = null |
Definition at line 37 of file MetadataTool.php.
$tablename = null |
Definition at line 25 of file MetadataTool.php.