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

File: Table.php

Source Location: /DB_Table-1.5.6/DB/Table.php

Classes:

DB_Table
DB_Table is a database API and data type SQL abstraction class.

Page Details:

DB_Table is a database API and data type SQL abstraction class.

DB_Table provides database API abstraction, data type abstraction, automated SELECT, INSERT, and UPDATE queries, automated table creation, automated validation of inserted/updated column values, and automated creation of QuickForm elements based on the column definitions.

PHP versions 4 and 5

LICENSE:

Copyright (c) 1997-2007, Paul M. Jones <pmjones@php.net> David C. Morse <morse@php.net> Mark Wiesemann <wiesemann@php.net> All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Includes:

require_once('DB/Table/Base.php') [line 286]
The DB_Table_Base parent class
require_once('PEAR.php') [line 291]
The PEAR class for errors
require_once('DB/Table/Date.php') [line 296]
The Date class for recasting date and time values

DB_TABLE_ERR_ALTER_INDEX_IMPOS [line 269]

DB_TABLE_ERR_ALTER_INDEX_IMPOS = -36
Error code at alter() time when altering a(n) index/constraint is not possible (e.g. because MDB2 has no support for the change or because the DBMS does not support the change).

[ Top ]



DB_TABLE_ERR_ALTER_TABLE_IMPOS [line 262]

DB_TABLE_ERR_ALTER_TABLE_IMPOS = -35
Error code at alter() time when altering a table field is not possible (e.g. because MDB2 has no support for the change or because the DBMS does not support the change).

[ Top ]



DB_TABLE_ERR_AUTO_INC_COL [line 275]

DB_TABLE_ERR_AUTO_INC_COL = -37
Error code at insert() time due to invalid the auto-increment column definition. This column must be an integer type and required.

[ Top ]



DB_TABLE_ERR_CREATE_FLAG [line 117]

DB_TABLE_ERR_CREATE_FLAG = -11
Error code when you use a create() flag that is not recognized (must be 'safe', 'drop', 'verify' or boolean false.

[ Top ]



DB_TABLE_ERR_CREATE_PHPTYPE [line 243]

DB_TABLE_ERR_CREATE_PHPTYPE = -32
Error code at instantiation time when a creation mode is not available for a phptype.

[ Top ]



DB_TABLE_ERR_DECLARE_COLNAME [line 165]

DB_TABLE_ERR_DECLARE_COLNAME = -19
Error code at create() time when you define a column in $this->col with an invalid column name (usually because it's a reserved keyword).

[ Top ]



DB_TABLE_ERR_DECLARE_DECIMAL [line 147]

DB_TABLE_ERR_DECLARE_DECIMAL = -16
Error code at create() time when you have an error in a 'decimal' definition (usually becuase the 'size' or 'scope' are wrong).

[ Top ]



DB_TABLE_ERR_DECLARE_IDXNAME [line 171]

DB_TABLE_ERR_DECLARE_IDXNAME = -20
Error code at create() time when you define an index in $this->idx with an invalid index name (usually because it's a reserved keyword).

[ Top ]



DB_TABLE_ERR_DECLARE_PRIMARY [line 249]

DB_TABLE_ERR_DECLARE_PRIMARY = -33
Error code at create() time when you define more than one primary key in $this->idx.

[ Top ]



DB_TABLE_ERR_DECLARE_PRIM_SQLITE [line 255]

DB_TABLE_ERR_DECLARE_PRIM_SQLITE = -34
Error code at create() time when a primary key is defined in $this->idx and SQLite is used (SQLite does not support primary keys).

[ Top ]



DB_TABLE_ERR_DECLARE_STRING [line 141]

DB_TABLE_ERR_DECLARE_STRING = -15
Error code at create() time when you have an error in a 'char' or 'varchar' definition in $this->col (usually because 'size' is wrong).

[ Top ]



DB_TABLE_ERR_DECLARE_STRLEN [line 183]

DB_TABLE_ERR_DECLARE_STRLEN = -22
Error code at create() time when you define a column name that is more than 30 chars long (an Oracle restriction).

[ Top ]



DB_TABLE_ERR_DECLARE_TYPE [line 153]

DB_TABLE_ERR_DECLARE_TYPE = -17
Error code at create() time when you define a column in $this->col with an unrecognized 'type'.

[ Top ]



DB_TABLE_ERR_IDX_COL_CLOB [line 177]

DB_TABLE_ERR_IDX_COL_CLOB = -21
Error code at create() time when you define an index in $this->idx that refers to a CLOB column.

[ Top ]



DB_TABLE_ERR_IDX_COL_UNDEF [line 129]

DB_TABLE_ERR_IDX_COL_UNDEF = -13
Error code at create() time when you define an index in $this->idx that refers to a column that does not exist in the $this->col array.

[ Top ]



DB_TABLE_ERR_IDX_NO_COLS [line 123]

DB_TABLE_ERR_IDX_NO_COLS = -12
Error code at create() time when you define an index in $this->idx that has no columns.

[ Top ]



DB_TABLE_ERR_IDX_STRLEN [line 189]

DB_TABLE_ERR_IDX_STRLEN = -23
Error code at create() time when the index name ends up being more than 30 chars long (an Oracle restriction).

[ Top ]



DB_TABLE_ERR_IDX_TYPE [line 135]

DB_TABLE_ERR_IDX_TYPE = -14
Error code at create() time when you define a $this->idx index type that is not recognized (must be 'normal' or 'unique').

[ Top ]



DB_TABLE_ERR_INS_COL_NOMAP [line 83]

DB_TABLE_ERR_INS_COL_NOMAP = -5
Error code when you try to insert data to a column that is not in the $this->col array.

[ Top ]



DB_TABLE_ERR_INS_COL_REQUIRED [line 89]

DB_TABLE_ERR_INS_COL_REQUIRED = -6
Error code when you try to insert data, and that data does not have a column marked as 'require' in the $this->col array.

[ Top ]



DB_TABLE_ERR_INS_DATA_INVALID [line 94]

DB_TABLE_ERR_INS_DATA_INVALID = -7
Error code when auto-validation fails on data to be inserted.

[ Top ]



DB_TABLE_ERR_NOT_DB_OBJECT [line 59]

DB_TABLE_ERR_NOT_DB_OBJECT = -1
Error code at instantiation time when the first parameter to the constructor is not a PEAR DB object.

[ Top ]



DB_TABLE_ERR_NO_COLS [line 225]

DB_TABLE_ERR_NO_COLS = -29
Error code at instantiation time when the column definition array does not contain at least one column.

[ Top ]



DB_TABLE_ERR_PHPTYPE [line 65]

DB_TABLE_ERR_PHPTYPE = -2
Error code at instantiation time when the PEAR DB/MDB2 $phptype is not supported by DB_Table.

[ Top ]



DB_TABLE_ERR_SEQ_STRLEN [line 201]

DB_TABLE_ERR_SEQ_STRLEN = -25
Error code at nextID() time when the sequence name is more than 30 chars long (an Oracle restriction).

[ Top ]



DB_TABLE_ERR_SQL_NOT_STRING [line 77]

DB_TABLE_ERR_SQL_NOT_STRING = -4
Error code when you call select*() or buildSQL() and the first

parameter is neither an array nor a string


[ Top ]



DB_TABLE_ERR_SQL_UNDEF [line 71]

DB_TABLE_ERR_SQL_UNDEF = -3
Error code when you call select() or selectResult() and the first parameter is a string that does not match any of the $this->sql keys.

[ Top ]



DB_TABLE_ERR_TABLE_NAME_MISSING [line 281]

DB_TABLE_ERR_TABLE_NAME_MISSING = -38
Error code at instantiation time when both the $table parameter and the $table class property are missing.

[ Top ]



DB_TABLE_ERR_TABLE_STRLEN [line 195]

DB_TABLE_ERR_TABLE_STRLEN = -24
Error code at create() time when the table name is more than 30 chars long (an Oracle restriction).

[ Top ]



DB_TABLE_ERR_UPD_COL_NOMAP [line 100]

DB_TABLE_ERR_UPD_COL_NOMAP = -8
Error code when you try to update data to a column that is not in the $this->col array.

[ Top ]



DB_TABLE_ERR_UPD_COL_REQUIRED [line 106]

DB_TABLE_ERR_UPD_COL_REQUIRED = -9
Error code when you try to update data, and that data does not have a column marked as 'require' in the $this->col array.

[ Top ]



DB_TABLE_ERR_UPD_DATA_INVALID [line 111]

DB_TABLE_ERR_UPD_DATA_INVALID = -10
Error code when auto-validation fails on update data.

[ Top ]



DB_TABLE_ERR_VALIDATE_TYPE [line 159]

DB_TABLE_ERR_VALIDATE_TYPE = -18
Error code at validation time when a column in $this->col has an unrecognized 'type'.

[ Top ]



DB_TABLE_ERR_VER_COLUMN_MISSING [line 213]

DB_TABLE_ERR_VER_COLUMN_MISSING = -27
Error code at verify() time when the column does not exist in the database table.

[ Top ]



DB_TABLE_ERR_VER_COLUMN_TYPE [line 219]

DB_TABLE_ERR_VER_COLUMN_TYPE = -28
Error code at verify() time when the column type does not match the type specified in the column declaration.

[ Top ]



DB_TABLE_ERR_VER_IDX_COL_MISSING [line 237]

DB_TABLE_ERR_VER_IDX_COL_MISSING = -31
Error code at verify() time when an index does not contain all columns that it should contain.

[ Top ]



DB_TABLE_ERR_VER_IDX_MISSING [line 231]

DB_TABLE_ERR_VER_IDX_MISSING = -30
Error code at verify() time when an index cannot be found in the database table.

[ Top ]



DB_TABLE_ERR_VER_TABLE_MISSING [line 207]

DB_TABLE_ERR_VER_TABLE_MISSING = -26
Error code at verify() time when the table does not exist in the database.

[ Top ]



Documentation generated on Thu, 25 Dec 2008 15:00:32 -0500 by phpDocumentor 1.4.0. PEAR Logo Copyright © PHP Group 2004.