This class provides the power of creating classes that simplify the acccess of database tables.
Located in /code/framework/RSDEngine/RSDEngineDB.php (line 55)
PEAR | --RSDEngineDB
The authors, each stored as one array element. Gets set inside the constructor method.
The column prefix used for all columns in $this->sql. Often f_. Providing a column prefix makes the generated code more readable because the prefix can be remove where appropriate. Set in the construtor method.
An associative array containing all configuration options. Gets set inside the constructor method.
The copyright information. This string must not contain newlines. Gets set inside the constructor method.
The project name. Gets set inside the constructor method.
An array containing instances of RSDEngineRelation.
The Database schema in SQL DDL. Gets set inside the constructor method.
The table prefix used for all tables in $this->sql. Often t_ or an shorthand for the project name of the form prj_. Providing a table prefix makes the generated code more readable because the prefix can be remove where appropriate. Set in the construtor method.
An array containing instances of RSDEngineDBTable.
Initializes this instance.
Generates and returns the base and the child class for each table defined in $this->sql.
The generation is performed by $this->_parse(). Each class is stored as an instance of RSDEngineClass.
Returns the functions generated by RSDEngineDB in an associative array.
Each function is stored as an instance of RSDEngineFunction. By now now functions are created at all!
Returns the table named $tableName or an instance of RSError on failure.
Returns an associative array containing instances of child classes of RSDEngineFile.
Returns true if the table specified by it's name passed as first argument exists.
Adds an instance of RSDEngineDBTable to the internal stack of RSDEngineDBTable object.
The instance passed as argument is added to the property array tables.
Produces warnings for columns that are not unique.
Column names should be unique because when fetching records from a query joining multiple tables into an assocciative array with the column names as keys, one column might overwrite the other.
Checks if all relations in the array passed as argument have existing starting points and destinations.
The properties fromTable, fromColumn, toTable, toColumn are checked for all relations.
Copies all RSDRelation objects hold by the RSDEngineDBTable instances in RSDEngineDBTable::realations to RSDEngine::relations.
Calls createJoin _createJoinFunctionsForTable for each instance of RSDEngineDBTable.
Calls RSDEngineDBTable::createSelectIncludingMethod for each combination of relations valid for a table.
RSDEngine::_generateNameForCreateSelectIncludingMethod is used to genertae the method name.
Calls the method RSDEngineDBTable::createKeyMethods for all RSDEngineDBTable objects.
Returns a name for a selectIncluding* method which is determinated by the relations passed as argument.
Returns an Array containing all relations that have the table specified by the first argument as starting point.
Returns an Array or relations that start from the table $tableName or from the tables these relations point to.
Returns true if the combination of relations passed as array as second argument is valid for the table name passed as first argument.
Parses the provided SQL DDL stored in the property $this->sql and generates a RSDEngineDBTable object for each table, stores it in $this->tables.
Strips the table prefix from a table name and returns it.
Set foreign/primary key related properties for all RSDEngineDBTable objects.
Documentation generated on Mon, 8 Dec 2003 13:10:48 +0100 by phpDocumentor 1.2.3