TYPO3 CMS  TYPO3_7-6
dbTable Class Reference
Inheritance diagram for dbTable:
dbObject dbObject

Public Member Functions

 __construct (&$parent, $attributes=NULL)
 
 _tag_open (&$parser, $tag, $attributes)
 
 _tag_cdata (&$parser, $cdata)
 
 _tag_close (&$parser, $tag)
 
 addIndex ( $attributes)
 
 addData ( $attributes)
 
 addField ( $name, $type, $size=NULL, $opts=NULL)
 
 addFieldOpt ( $field, $opt, $value=NULL)
 
 addTableOpt ( $opt)
 
 create (&$xmls)
 
 drop ()
 
 __construct (&$parent, $attributes=NULL)
 
 _tag_open (&$parser, $tag, $attributes)
 
 _tag_cdata (&$parser, $cdata)
 
 _tag_close (&$parser, $tag)
 
 addIndex ( $attributes)
 
 addData ( $attributes)
 
 addField ( $name, $type, $size=NULL, $opts=NULL)
 
 addFieldOpt ( $field, $opt, $value=NULL)
 
 addTableOpt ( $opt)
 
 create (&$xmls)
 
 drop ()
 
- Public Member Functions inherited from dbObject
 __construct (&$parent, $attributes=NULL)
 
 _tag_open (&$parser, $tag, $attributes)
 
 _tag_cdata (&$parser, $cdata)
 
 _tag_close (&$parser, $tag)
 
 create (&$xmls)
 
 destroy ()
 
 supportedPlatform ( $platform=NULL)
 
 prefix ( $name='')
 
 FieldID ( $field)
 
 __construct (&$parent, $attributes=NULL)
 
 _tag_open (&$parser, $tag, $attributes)
 
 _tag_cdata (&$parser, $cdata)
 
 _tag_close (&$parser, $tag)
 
 create (&$xmls)
 
 destroy ()
 
 supportedPlatform ( $platform=NULL)
 
 prefix ( $name='')
 
 FieldID ( $field)
 

Public Attributes

 $name
 
 $fields = array()
 
 $indexes = array()
 
 $opts = array()
 
 $current_field
 
 $drop_table
 
 $drop_field = array()
 
 $currentPlatform = true
 
- Public Attributes inherited from dbObject
 $parent
 
 $currentElement
 

Detailed Description

Definition at line 205 of file adodb-xmlschema.inc.php.

Constructor & Destructor Documentation

◆ __construct() [1/2]

dbTable::__construct ( $parent,
  $attributes = NULL 
)

Iniitializes a new table object.

Parameters
string$prefixDB Object prefix
array$attributesArray of table attributes.

Definition at line 250 of file adodb-xmlschema.inc.php.

References dbObject\$parent, and dbObject\prefix().

◆ __construct() [2/2]

dbTable::__construct ( $parent,
  $attributes = NULL 
)

Iniitializes a new table object.

Parameters
string$prefixDB Object prefix
array$attributesArray of table attributes.

Definition at line 275 of file adodb-xmlschema03.inc.php.

References dbObject\$parent, and dbObject\prefix().

Member Function Documentation

◆ _tag_cdata() [1/2]

dbTable::_tag_cdata ( $parser,
  $cdata 
)

XML Callback to process CDATA elements

private

Definition at line 318 of file adodb-xmlschema.inc.php.

◆ _tag_cdata() [2/2]

dbTable::_tag_cdata ( $parser,
  $cdata 
)

XML Callback to process CDATA elements

private

Definition at line 346 of file adodb-xmlschema03.inc.php.

◆ _tag_close() [1/2]

dbTable::_tag_close ( $parser,
  $tag 
)

XML Callback to process end elements

private

Definition at line 342 of file adodb-xmlschema.inc.php.

References dbObject\create(), and dbObject\destroy().

◆ _tag_close() [2/2]

dbTable::_tag_close ( $parser,
  $tag 
)

XML Callback to process end elements

private

Definition at line 374 of file adodb-xmlschema03.inc.php.

References dbObject\create(), and dbObject\destroy().

◆ _tag_open() [1/2]

dbTable::_tag_open ( $parser,
  $tag,
  $attributes 
)

XML Callback to process start elements. Elements currently processed are: INDEX, DROP, FIELD, KEY, NOTNULL, AUTOINCREMENT & DEFAULT.

private

Definition at line 261 of file adodb-xmlschema.inc.php.

References dbObject\supportedPlatform().

◆ _tag_open() [2/2]

dbTable::_tag_open ( $parser,
  $tag,
  $attributes 
)

XML Callback to process start elements. Elements currently processed are: INDEX, DROP, FIELD, KEY, NOTNULL, AUTOINCREMENT & DEFAULT.

private

Definition at line 286 of file adodb-xmlschema03.inc.php.

References dbObject\supportedPlatform().

◆ addData() [1/2]

dbTable::addData (   $attributes)

Adds data to a table object

Parameters
array$attributesData attributes
Returns
object dbData object

Definition at line 376 of file adodb-xmlschema.inc.php.

◆ addData() [2/2]

dbTable::addData (   $attributes)

Adds data to a table object

Parameters
array$attributesData attributes
Returns
object dbData object

Definition at line 413 of file adodb-xmlschema03.inc.php.

◆ addField() [1/2]

dbTable::addField (   $name,
  $type,
  $size = NULL,
  $opts = NULL 
)

Adds a field to a table object

$name is the name of the table to which the field should be added. $type is an ADODB datadict field type. The following field types are supported as of ADODB 3.40:

  • C: varchar

X: CLOB (character large object) or largest varchar size if CLOB is not supported

  • C2: Multibyte varchar
  • X2: Multibyte CLOB
  • B: BLOB (binary large object)
  • D: Date (some databases do not support this, and we return a datetime type)
  • T: Datetime or Timestamp
  • L: Integer field suitable for storing booleans (0 or 1)
  • I: Integer (mapped to I4)
  • I1: 1-byte integer
  • I2: 2-byte integer
  • I4: 4-byte integer
  • I8: 8-byte integer
  • F: Floating point number
  • N: Numeric or decimal number
Parameters
string$nameName of the table to which the field will be added.
string$typeADODB datadict field type.
string$sizeField size
array$optsField options array
Returns
array Field specifier array

Definition at line 412 of file adodb-xmlschema.inc.php.

References dbObject\FieldID().

◆ addField() [2/2]

dbTable::addField (   $name,
  $type,
  $size = NULL,
  $opts = NULL 
)

Adds a field to a table object

$name is the name of the table to which the field should be added. $type is an ADODB datadict field type. The following field types are supported as of ADODB 3.40:

  • C: varchar

X: CLOB (character large object) or largest varchar size if CLOB is not supported

  • C2: Multibyte varchar
  • X2: Multibyte CLOB
  • B: BLOB (binary large object)
  • D: Date (some databases do not support this, and we return a datetime type)
  • T: Datetime or Timestamp
  • L: Integer field suitable for storing booleans (0 or 1)
  • I: Integer (mapped to I4)
  • I1: 1-byte integer
  • I2: 2-byte integer
  • I4: 4-byte integer
  • I8: 8-byte integer
  • F: Floating point number
  • N: Numeric or decimal number
Parameters
string$nameName of the table to which the field will be added.
string$typeADODB datadict field type.
string$sizeField size
array$optsField options array
Returns
array Field specifier array

Definition at line 449 of file adodb-xmlschema03.inc.php.

References dbObject\FieldID().

◆ addFieldOpt() [1/2]

dbTable::addFieldOpt (   $field,
  $opt,
  $value = NULL 
)

Adds a field option to the current field specifier

This method adds a field option allowed by the ADOdb datadict and appends it to the given field.

Parameters
string$fieldField name
string$optADOdb field option
mixed$valueField option value
Returns
array Field specifier array

Definition at line 446 of file adodb-xmlschema.inc.php.

References dbObject\FieldID().

◆ addFieldOpt() [2/2]

dbTable::addFieldOpt (   $field,
  $opt,
  $value = NULL 
)

Adds a field option to the current field specifier

This method adds a field option allowed by the ADOdb datadict and appends it to the given field.

Parameters
string$fieldField name
string$optADOdb field option
mixed$valueField option value
Returns
array Field specifier array

Definition at line 485 of file adodb-xmlschema03.inc.php.

References dbObject\FieldID().

◆ addIndex() [1/2]

dbTable::addIndex (   $attributes)

Adds an index to a table object

Parameters
array$attributesIndex attributes
Returns
object dbIndex object

Definition at line 364 of file adodb-xmlschema.inc.php.

◆ addIndex() [2/2]

dbTable::addIndex (   $attributes)

Adds an index to a table object

Parameters
array$attributesIndex attributes
Returns
object dbIndex object

Definition at line 401 of file adodb-xmlschema03.inc.php.

◆ addTableOpt() [1/2]

dbTable::addTableOpt (   $opt)

Adds an option to the table

This method takes a comma-separated list of table-level options and appends them to the table object.

Parameters
string$optTable option
Returns
array Options

Definition at line 464 of file adodb-xmlschema.inc.php.

◆ addTableOpt() [2/2]

dbTable::addTableOpt (   $opt)

Adds an option to the table

This method takes a comma-separated list of table-level options and appends them to the table object.

Parameters
string$optTable option
Returns
array Options

Definition at line 505 of file adodb-xmlschema03.inc.php.

◆ create() [1/2]

dbTable::create ( $xmls)

Generates the SQL that will create the table in the database

Parameters
object$xmlsadoSchema object
Returns
array Array containing table creation SQL

Definition at line 478 of file adodb-xmlschema.inc.php.

References $sql, and logMsg().

◆ create() [2/2]

dbTable::create ( $xmls)

Generates the SQL that will create the table in the database

Parameters
object$xmlsadoSchema object
Returns
array Array containing table creation SQL

Definition at line 519 of file adodb-xmlschema03.inc.php.

References $sql, and logMsg().

◆ drop() [1/2]

dbTable::drop ( )

Marks a field or table for destruction

Definition at line 587 of file adodb-xmlschema.inc.php.

References logMsg().

◆ drop() [2/2]

dbTable::drop ( )

Marks a field or table for destruction

Definition at line 628 of file adodb-xmlschema03.inc.php.

References logMsg().

Member Data Documentation

◆ $current_field

dbTable::$current_field

Definition at line 230 of file adodb-xmlschema.inc.php.

◆ $currentPlatform

dbTable::$currentPlatform = true

Definition at line 266 of file adodb-xmlschema03.inc.php.

◆ $drop_field

dbTable::$drop_field = array()

Definition at line 242 of file adodb-xmlschema.inc.php.

◆ $drop_table

dbTable::$drop_table

Definition at line 236 of file adodb-xmlschema.inc.php.

◆ $fields

dbTable::$fields = array()

Definition at line 215 of file adodb-xmlschema.inc.php.

◆ $indexes

dbTable::$indexes = array()

Definition at line 220 of file adodb-xmlschema.inc.php.

◆ $name

dbTable::$name

Definition at line 210 of file adodb-xmlschema.inc.php.

◆ $opts

dbTable::$opts = array()

Definition at line 225 of file adodb-xmlschema.inc.php.