MagicSmoke  $VERSION$
WobSchemaBase Class Reference

This class parses the high-level description of the database structure generated by woc; access it via WobScheme::*. More...

Inheritance diagram for WobSchemaBase:
WobSchema

Public Member Functions

 __construct ()
 

Static Public Member Functions

static backupGroupSizeForTable ($table)
 return the recommended group size for backups or <=0 for default More...
 
static backupKeyForTable ($table)
 return the key by which backups should be grouped for a table, empty string if it should not be backed up or be backed up in full More...
 
static backupTables ()
 return the tables that are included in the backup More...
 
static columnFlags ($tab, $col)
 return the flags of a column, empty array if no flags are set, or false if the column does not exist More...
 
static columnType ($tab, $col)
 return the type of a column, or false if it does not exist More...
 
static configKeyColumn ()
 
static configTable ()
 
static configValueColumn ()
 
static configVersionRow ()
 
static hasSequence ($tab)
 returns the sequence column name if the table has a sequence, false otherwise More...
 
static hasTable ($t)
 returns whether a table exists in the schema More...
 
static isBlobColumn ($tab, $col)
 returns true if the given column is of a blob type More...
 
static isBoolColumn ($tab, $col)
 returns true if the given column is of a bool type More...
 
static isIntColumn ($tab, $col)
 returns true if the given column is of an integer type More...
 
static isStringColumn ($tab, $col)
 returns true if the given column is of a string type More...
 
static primaryKeyColumns ($tab)
 returns the names of all primary key columns of the table More...
 
static tableColumns ($tab)
 return the names of all columns of a table, or false if the table does not exist More...
 
static tableDefaults ($tab)
 return default lines of the table for the initialization; returns empty array if there are none More...
 
static tableDefinition ($tab)
 return the full definition of a table, or false if it does not exist More...
 
static tableHasColumn ($tab, $col)
 return whether the table has this column More...
 
static tableNames ()
 return the tables to be created in order More...
 
static version ()
 return the version of this scheme More...
 

Static Protected Attributes

static $backup
 
static $backupCfg
 
static $config
 
static $preset
 
static $scheme
 
static $sversion
 

Detailed Description

This class parses the high-level description of the database structure generated by woc; access it via WobScheme::*.

Constructor & Destructor Documentation

WobSchemaBase::__construct ( )

Member Function Documentation

static WobSchemaBase::backupGroupSizeForTable (   $table)
static

return the recommended group size for backups or <=0 for default

Referenced by DbEngine\exploreBackup().

static WobSchemaBase::backupKeyForTable (   $table)
static

return the key by which backups should be grouped for a table, empty string if it should not be backed up or be backed up in full

Referenced by DbEngine\exploreBackup().

static WobSchemaBase::backupTables ( )
static

return the tables that are included in the backup

Referenced by DbEngine\dumpBackup(), DbEngine\exploreBackup(), PGsqlEngine\lockDB(), and MysqlEngine\lockDB().

static WobSchemaBase::columnFlags (   $tab,
  $col 
)
static

return the flags of a column, empty array if no flags are set, or false if the column does not exist

References $col.

static WobSchemaBase::columnType (   $tab,
  $col 
)
static

return the type of a column, or false if it does not exist

References $col.

static WobSchemaBase::configKeyColumn ( )
static
static WobSchemaBase::configTable ( )
static
static WobSchemaBase::configValueColumn ( )
static
static WobSchemaBase::configVersionRow ( )
static
static WobSchemaBase::hasSequence (   $tab)
static

returns the sequence column name if the table has a sequence, false otherwise

Referenced by WobTable\insert(), MysqlEngine\insert(), PGsqlEngine\insert(), WobTable\newKey(), PGsqlEngine\syncSequence(), and DbEngine\syncSequences().

static WobSchemaBase::hasTable (   $t)
static

returns whether a table exists in the schema

Referenced by PGsqlEngine\hasTable(), and MysqlEngine\hasTable().

static WobSchemaBase::isBlobColumn (   $tab,
  $col 
)
static

returns true if the given column is of a blob type

References $col.

Referenced by DbEngine\escapeColumn(), PGsqlEngine\select(), DbEngine\sqlInsert(), and DbEngine\sqlUpdate().

static WobSchemaBase::isBoolColumn (   $tab,
  $col 
)
static

returns true if the given column is of a bool type

References $col.

Referenced by DbEngine\escapeColumn(), PGsqlEngine\select(), DbEngine\sqlInsert(), and DbEngine\sqlUpdate().

static WobSchemaBase::isIntColumn (   $tab,
  $col 
)
static

returns true if the given column is of an integer type

References $col.

Referenced by DbEngine\escapeColumn(), DbEngine\exploreBackup(), PGsqlEngine\select(), DbEngine\sqlInsert(), and DbEngine\sqlUpdate().

static WobSchemaBase::isStringColumn (   $tab,
  $col 
)
static

returns true if the given column is of a string type

References $col.

Referenced by DbEngine\escapeColumn(), DbEngine\exploreBackup(), DbEngine\sqlInsert(), and DbEngine\sqlUpdate().

static WobSchemaBase::primaryKeyColumns (   $tab)
static

returns the names of all primary key columns of the table

References $col.

Referenced by WobTable\where().

static WobSchemaBase::tableColumns (   $tab)
static

return the names of all columns of a table, or false if the table does not exist

Referenced by DbEngine\dumpBackup().

static WobSchemaBase::tableDefaults (   $tab)
static

return default lines of the table for the initialization; returns empty array if there are none

Referenced by DbEngine\createDb(), DbEngine\showCreateDb(), and DbEngine\upgradeDb().

static WobSchemaBase::tableDefinition (   $tab)
static

return the full definition of a table, or false if it does not exist

Referenced by DbEngine\createDb(), DbEngine\showCreateDb(), DbEngine\upgradeDb(), MysqlEngine\upgradeTable(), and PGsqlEngine\upgradeTable().

static WobSchemaBase::tableHasColumn (   $tab,
  $col 
)
static

return whether the table has this column

References $col.

Referenced by WobTable\hasColumn(), DbEngine\sqlInsert(), and DbEngine\sqlUpdate().

static WobSchemaBase::tableNames ( )
static

return the tables to be created in order

Referenced by DbEngine\createDb(), DbEngine\showCreateDb(), DbEngine\syncSequences(), and DbEngine\upgradeDb().

static WobSchemaBase::version ( )
static

return the version of this scheme

Referenced by WobSchema\__construct(), and DbEngine\needVersion().

Member Data Documentation

WobSchemaBase::$backup
staticprotected
WobSchemaBase::$backupCfg
staticprotected
WobSchemaBase::$config
staticprotected
WobSchemaBase::$preset
staticprotected
WobSchemaBase::$scheme
staticprotected
WobSchemaBase::$sversion
staticprotected

The documentation for this class was generated from the following file: