Pluf_DB_Schema Class Reference

List of all members.

Public Member Functions

 __construct ($db, $model=null)
 getGenerator ()
 createTables ()
 dropTables ()

Static Public Member Functions

static quoteColumn ($col, $db)

Public Attributes

 $model = null
 $schema = null

Private Attributes

 $con = null


Detailed Description

Create the schema of a given Pluf_Model for a given database.

Constructor & Destructor Documentation

Pluf_DB_Schema::__construct ( db,
model = null 
)


Member Function Documentation

Pluf_DB_Schema::getGenerator (  ) 

Get the schema generator.

Returns:
object Pluf_DB_Schema_XXXX

Pluf_DB_Schema::createTables (  ) 

Create the tables and indexes for the current model.

Returns:
mixed True if success or database error.

Pluf_DB_Schema::dropTables (  ) 

Drop the tables and indexes for the current model.

Returns:
mixed True if success or database error.

static Pluf_DB_Schema::quoteColumn ( col,
db 
) [static]

Given a column name or a string with column names in the format "column1, column2, column3", returns the escaped correctly quoted column names. This is good for index creation.

Parameters:
string Column
Pluf_DB DB handler
Returns:
string Quoted for the DB column(s)


Member Data Documentation

Pluf_DB_Schema::$con = null [private]

Database connection object.

Pluf_DB_Schema::$model = null

Model from which the schema is generated.

Pluf_DB_Schema::$schema = null

Schema generator object corresponding to the database.


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

Generated on Wed Feb 3 15:44:51 2010 for Pluf by  doxygen