Moodle  2.2.1
http://www.collinsharper.com
dbTable Class Reference
Inheritance diagram for dbTable:
Collaboration diagram for dbTable:

Public Member Functions

 dbTable (&$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 ()
 dbTable (&$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 ()

Data Fields

 $name
 $fields = array()
 $indexes = array()
 $opts = array()
 $current_field
 $drop_table
 $drop_field = array()
 $currentPlatform = true

Detailed Description

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


Member Function Documentation

_tag_cdata ( &$  parser,
cdata 
)

XML Callback to process CDATA elements

private

Reimplemented from dbObject.

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

Here is the call graph for this function:

_tag_cdata ( &$  parser,
cdata 
)

XML Callback to process CDATA elements

private

Reimplemented from dbObject.

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

Here is the call graph for this function:

_tag_close ( &$  parser,
tag 
)

XML Callback to process end elements

private

Reimplemented from dbObject.

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

Here is the call graph for this function:

_tag_close ( &$  parser,
tag 
)

XML Callback to process end elements

private

Reimplemented from dbObject.

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

Here is the call graph for this function:

_tag_open ( &$  parser,
tag,
attributes 
)

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

private

Reimplemented from dbObject.

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

Here is the call graph for this function:

_tag_open ( &$  parser,
tag,
attributes 
)

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

private

Reimplemented from dbObject.

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

Here is the call graph for this function:

addData ( attributes)

Adds data to a table object

Parameters:
array$attributesData attributes
Returns:
object dbData object

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

Here is the caller graph for this function:

addData ( attributes)

Adds data to a table object

Parameters:
array$attributesData attributes
Returns:
object dbData object

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

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 413 of file adodb-xmlschema.inc.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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 450 of file adodb-xmlschema03.inc.php.

Here is the call graph for this function:

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 447 of file adodb-xmlschema.inc.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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 486 of file adodb-xmlschema03.inc.php.

Here is the call graph for this function:

addIndex ( attributes)

Adds an index to a table object

Parameters:
array$attributesIndex attributes
Returns:
object dbIndex object

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

Here is the caller graph for this function:

addIndex ( attributes)

Adds an index to a table object

Parameters:
array$attributesIndex attributes
Returns:
object dbIndex object

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

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 465 of file adodb-xmlschema.inc.php.

Here is the caller graph for this function:

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 506 of file adodb-xmlschema03.inc.php.

create ( &$  xmls)

Generates the SQL that will create the table in the database

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

Reimplemented from dbObject.

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

Here is the call graph for this function:

Here is the caller graph for this function:

create ( &$  xmls)

Generates the SQL that will create the table in the database

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

Reimplemented from dbObject.

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

Here is the call graph for this function:

dbTable ( &$  parent,
attributes = NULL 
)

Iniitializes a new table object.

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

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

Here is the call graph for this function:

dbTable ( &$  parent,
attributes = NULL 
)

Iniitializes a new table object.

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

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

Here is the call graph for this function:

drop ( )

Marks a field or table for destruction

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

Here is the call graph for this function:

Here is the caller graph for this function:

drop ( )

Marks a field or table for destruction

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

Here is the call graph for this function:


Field Documentation

$current_field

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

$currentPlatform = true

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

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

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

$fields = array()

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

$indexes = array()

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

$name

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

$opts = array()

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


The documentation for this class was generated from the following files:
 All Data Structures Namespaces Files Functions Variables Enumerations