DB_Table
[ class tree: DB_Table ] [ index: DB_Table ] [ all elements ]

Class: DB_Table_Manager

Source Location: /DB_Table-0.21.2/DB/Table/Manager.php

Class Overview


Creates tables from DB_Table definitions.


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 21]
Creates tables from DB_Table definitions.

DB_Table_Manager provides database automated table creation facilities (and eventually table alteration as well).

$Id: Manager.php,v 1.4 2004/07/10 15:08:33 pmjones Exp $



[ Top ]


Method Detail

create   [line 46]

mixed create( object &$db, string $table, mixed $column_set, mixed $index_set)

Create the table based on DB_Table column and index arrays.
  • Return: Boolean false if there was no attempt to create the table, boolean true if the attempt succeeded, and a PEAR_Error if the attempt failed.
  • Access: public

Parameters:

object   &$db   —  A PEAR DB object.
string   $table   —  The table name to connect to in the database.
mixed   $column_set   —  A DB_Table $this->col array.
mixed   $index_set   —  A DB_Table $this->idx array.

[ Top ]

getDeclare   [line 241]

string|object A getDeclare( string $phptype, string $coltype, [int $size = null], [int $scope = null], [bool $require = null], [string $default = null])

Get the column declaration string for a DB_Table column.
  • Return: declaration string on success, or a PEAR_Error on failure.
  • Access: public

Parameters:

string   $phptype   —  The DB phptype key.
string   $coltype   —  The DB_Table column type.
int   $size   —  The size for the column (needed for string and decimal).
int   $scope   —  The scope for the column (needed for decimal).
bool   $require   —  True if the column should be NOT NULL, false allowed to be NULL.
string   $default   —  The SQL calculation for a default value.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:52:54 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.