Class dbconstraint

Description

Defines a database constraint.

Located in /schema-defs.php (line 242)

SchemaObject
   |
   --dbconstraint
Direct descendents
Class Description
 class DB_dbconstraint Defines a database constraint.
Variable Summary
Method Summary
 dbconstraint dbconstraint (mixed &$schema, mixed $name, [mixed $type = "p"], [mixed $tablename = ""], [mixed $fktablename = ""], [mixed $flds = ""], [mixed $fkflds = ""], [mixed $updact = ""], [mixed $delact = ""], [mixed $match = ""], [mixed $cksrc = ""])
 void create ([mixed $outside_table = true])
 void create_inline ()
 void drop ()
 void dump ()
 void fields ()
 void fk_fields ()
 void getschema ()
 void matches (mixed $con)
 void set (mixed $type, [mixed $tablename = ""], [mixed $fktablename = ""], [mixed $flds = ""], [mixed $fkflds = ""], [mixed $updact = ""], [mixed $delact = ""], [mixed $match = ""], [mixed $cksrc = ""], [mixed $deferrable = false], [mixed $deferred = false])
Variables
mixed $cksrc = "" (line 264)

Check constraint source

mixed $deferrable = false (line 250)

True if constraint is deferrable

mixed $deferred = false (line 252)

True if constraint is initially deferred

mixed $delete_action = "" (line 260)

Action to take on delete

mixed $fieldnames = array() (line 254)

Array of table field names in constraint

mixed $fk_fieldnames = array() (line 256)

Array of referenced foreign key fieldnames

mixed $fk_tablename = "" (line 248)

Foreign key table name constraint refers to

mixed $match_type = "" (line 262)

Match type for keys

mixed $tablename = "" (line 246)

Name of table constraint is applied to

mixed $type = "" (line 244)

Type of constraint 'c' - check, 'p' - pk, 'f' - fk

mixed $update_action = "" (line 258)

Action to take on update

Inherited Variables

Inherited from SchemaObject

SchemaObject::$name
SchemaObject::$schema
Methods
Constructor dbconstraint (line 266)
dbconstraint dbconstraint (mixed &$schema, mixed $name, [mixed $type = "p"], [mixed $tablename = ""], [mixed $fktablename = ""], [mixed $flds = ""], [mixed $fkflds = ""], [mixed $updact = ""], [mixed $delact = ""], [mixed $match = ""], [mixed $cksrc = ""])
create (line 328)

Return SQL required to create this constraint outside the table

void create ([mixed $outside_table = true])
create_inline (line 323)

Return SQL required to create this as an inline table constraint

void create_inline ()
drop (line 433)
void drop ()
dump (line 317)

Dump ascii description of this constraint to stdout.

void dump ()
fields (line 414)
void fields ()
fk_fields (line 424)
void fk_fields ()
getschema (line 314)

Acquires the schema from database metadata.

NB: Override this function to get schema info per DB type.

void getschema ()

Redefined in descendants as:
matches (line 449)
void matches (mixed $con)
set (line 283)

Set constraint variables.

void set (mixed $type, [mixed $tablename = ""], [mixed $fktablename = ""], [mixed $flds = ""], [mixed $fkflds = ""], [mixed $updact = ""], [mixed $delact = ""], [mixed $match = ""], [mixed $cksrc = ""], [mixed $deferrable = false], [mixed $deferred = false])

Inherited Methods

Inherited From SchemaObject

 SchemaObject::SchemaObject()

Documentation generated by phpDocumentor 1.3.0RC3