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

Procedural File: DB.php

Source Location: /test/mockDB/DB.php



Classes:

DB
Mock DB class for testing
DB_common
Mock DB_common for testing
DB_Error
Mock DB_Error
DB_result
Mock DB_result
DB_row
Mock DB_row
DB_mysql
Mock DB_mysql class


Page Details:

File for mock DB class

This file has the same name as the file holding the PEAR DB class. To use the mock DB, put this file in the PHP include path ahead of the PEAR library, so that any class which requires DB.php will load this version.

(PHP 5)




Tags:

filesource:  Source Code for this file
author:  Walt Haas <haas@xmission.com>
version:  $Id: DB.php 198 2006-04-20 16:20:30Z haas $
copyright:  (c) Walter O. Haas 2006
license:  GNU Public License


Includes:

require_once('PHPUnit2/Framework/Assert.php') [line 21]
require_once('PEAR.php') [line 20]





DB_AUTOQUERY_INSERT [line 251]

DB_AUTOQUERY_INSERT = 1
The type of query to create with the automatic query building methods.



Tags:

see:  autoPrepare(), autoExecute()

[ Top ]



DB_AUTOQUERY_UPDATE [line 252]

DB_AUTOQUERY_UPDATE = 2

[ Top ]



DB_BINMODE_CONVERT [line 209]

DB_BINMODE_CONVERT = 3
Converts the data to hex format before returning it

For example the string "123" would become "313233".



[ Top ]



DB_BINMODE_PASSTHRU [line 197]

DB_BINMODE_PASSTHRU = 1
Sends the fetched data straight through to output


[ Top ]



DB_BINMODE_RETURN [line 202]

DB_BINMODE_RETURN = 2
Lets you return data as usual


[ Top ]



DB_ERROR [line 31]

DB_ERROR = -1
Unkown error


[ Top ]



DB_ERROR_ACCESS_VIOLATION [line 151]

DB_ERROR_ACCESS_VIOLATION = -26
The present user has inadequate permissions to perform the task requestd


[ Top ]



DB_ERROR_ALREADY_EXISTS [line 51]

DB_ERROR_ALREADY_EXISTS = -5
Tried to create a duplicate object


[ Top ]



DB_ERROR_CANNOT_CREATE [line 101]

DB_ERROR_CANNOT_CREATE = -15
Could not create the object requested


[ Top ]



DB_ERROR_CANNOT_DROP [line 106]

DB_ERROR_CANNOT_DROP = -17
Could not drop the database requested because it does not exist


[ Top ]



DB_ERROR_CONNECT_FAILED [line 141]

DB_ERROR_CONNECT_FAILED = -24
Could not connect to the database


[ Top ]



DB_ERROR_CONSTRAINT [line 41]

DB_ERROR_CONSTRAINT = -3
Tried to insert a duplicate value into a primary or unique index


[ Top ]



DB_ERROR_CONSTRAINT_NOT_NULL [line 161]

DB_ERROR_CONSTRAINT_NOT_NULL = -29
Tried to insert a null value into a column that doesn't allow nulls


[ Top ]



DB_ERROR_DIVZERO [line 91]

DB_ERROR_DIVZERO = -13
Attempt to divide something by zero


[ Top ]



DB_ERROR_EXTENSION_NOT_FOUND [line 146]

DB_ERROR_EXTENSION_NOT_FOUND = -25
The PHP extension needed for this DBMS could not be found


[ Top ]



DB_ERROR_INVALID [line 66]

DB_ERROR_INVALID = -8
A literal submitted did not match the data type expected


[ Top ]



DB_ERROR_INVALID_DATE [line 86]

DB_ERROR_INVALID_DATE = -12
A literal date submitted did not match the data type expected


[ Top ]



DB_ERROR_INVALID_DSN [line 136]

DB_ERROR_INVALID_DSN = -23
The DSN submitted has problems


[ Top ]



DB_ERROR_INVALID_NUMBER [line 81]

DB_ERROR_INVALID_NUMBER = -11
A literal number submitted did not match the data type expected


[ Top ]



DB_ERROR_MISMATCH [line 61]

DB_ERROR_MISMATCH = -7
The number of parameters does not match the number of placeholders


[ Top ]



DB_ERROR_NEED_MORE_DATA [line 121]

DB_ERROR_NEED_MORE_DATA = -20
The data submitted to the method was inappropriate


[ Top ]



DB_ERROR_NODBSELECTED [line 96]

DB_ERROR_NODBSELECTED = -14
A database needs to be selected


[ Top ]



DB_ERROR_NOSUCHDB [line 156]

DB_ERROR_NOSUCHDB = -27
The database requested does not exist


[ Top ]



DB_ERROR_NOSUCHFIELD [line 116]

DB_ERROR_NOSUCHFIELD = -19
An identifier in the query refers to a non-existant column


[ Top ]



DB_ERROR_NOSUCHTABLE [line 111]

DB_ERROR_NOSUCHTABLE = -18
An identifier in the query refers to a non-existant table


[ Top ]



DB_ERROR_NOT_CAPABLE [line 71]

DB_ERROR_NOT_CAPABLE = -9
The current DBMS does not support the action you attempted


[ Top ]



DB_ERROR_NOT_FOUND [line 46]

DB_ERROR_NOT_FOUND = -4
An identifier in the query refers to a non-existant object


[ Top ]



DB_ERROR_NOT_LOCKED [line 126]

DB_ERROR_NOT_LOCKED = -21
The attempt to lock the table failed


[ Top ]



DB_ERROR_SYNTAX [line 36]

DB_ERROR_SYNTAX = -2
Syntax error


[ Top ]



DB_ERROR_TRUNCATED [line 76]

DB_ERROR_TRUNCATED = -10
A literal submitted was too long so the end of it was removed


[ Top ]



DB_ERROR_UNSUPPORTED [line 56]

DB_ERROR_UNSUPPORTED = -6
The current driver does not support the action you attempted


[ Top ]



DB_ERROR_VALUE_COUNT_ON_ROW [line 131]

DB_ERROR_VALUE_COUNT_ON_ROW = -22
The number of columns doesn't match the number of values


[ Top ]



DB_FETCHMODE_ASSOC [line 216]

DB_FETCHMODE_ASSOC = 2

[ Top ]



DB_FETCHMODE_DEFAULT [line 214]

DB_FETCHMODE_DEFAULT = 0
Fetchmode constants


[ Top ]



DB_FETCHMODE_FLIPPED [line 226]

DB_FETCHMODE_FLIPPED = 4
For multi-dimensional results, make the column name the first level of the array and put the row number in the second level of the array

This is flipped from the normal behavior, which puts the row numbers in the first level of the array and the column names in the second level.



[ Top ]



DB_FETCHMODE_OBJECT [line 217]

DB_FETCHMODE_OBJECT = 3

[ Top ]



DB_FETCHMODE_ORDERED [line 215]

DB_FETCHMODE_ORDERED = 1

[ Top ]



DB_GETMODE_ASSOC [line 232]

DB_GETMODE_ASSOC = DB_FETCHMODE_ASSOC

[ Top ]



DB_GETMODE_FLIPPED [line 233]

DB_GETMODE_FLIPPED = DB_FETCHMODE_FLIPPED

[ Top ]



DB_GETMODE_ORDERED [line 231]

DB_GETMODE_ORDERED = DB_FETCHMODE_ORDERED
Old fetch modes. Left here for compatibility.


[ Top ]



DB_OK [line 26]

DB_OK = 1
The code returned by many methods upon success


[ Top ]



DB_PARAM_MISC [line 188]

DB_PARAM_MISC = 3
Indicates a misc (!) placeholder was used

The value should not be quoted or escaped.



[ Top ]



DB_PARAM_OPAQUE [line 181]

DB_PARAM_OPAQUE = 2
Indicates an opaque (&) placeholder was used

The value presented is a file name. Extract the contents of that file and place them in this column.



[ Top ]



DB_PARAM_SCALAR [line 173]

DB_PARAM_SCALAR = 1
Indicates a scalar (?) placeholder was used

Quote and escape the value as necessary.



[ Top ]



DB_PORTABILITY_ALL [line 311]

DB_PORTABILITY_ALL = 63
Turn on all portability features


[ Top ]



DB_PORTABILITY_DELETE_COUNT [line 282]

DB_PORTABILITY_DELETE_COUNT = 4
Force reporting the number of rows deleted


[ Top ]



DB_PORTABILITY_ERRORS [line 300]

DB_PORTABILITY_ERRORS = 16
Makes certain error messages in certain drivers compatible with those from other DBMS's

  • mysql, mysqli: change unique/primary key constraints DB_ERROR_ALREADY_EXISTS -> DB_ERROR_CONSTRAINT
  • odbc(access): MS's ODBC driver reports 'no such field' as code 07001, which means 'too few parameters.' When this option is on that code gets mapped to DB_ERROR_NOSUCHFIELD.



[ Top ]



DB_PORTABILITY_LOWERCASE [line 272]

DB_PORTABILITY_LOWERCASE = 1
Convert names of tables and fields to lower case

when using the get*(), fetch*() and tableInfo() methods



[ Top ]



DB_PORTABILITY_NONE [line 266]

DB_PORTABILITY_NONE = 0
Turn off all portability features


[ Top ]



DB_PORTABILITY_NULL_TO_EMPTY [line 306]

DB_PORTABILITY_NULL_TO_EMPTY = 32
Convert null values to empty strings in data output by

get*() and fetch*()



[ Top ]



DB_PORTABILITY_NUMROWS [line 287]

DB_PORTABILITY_NUMROWS = 8
Enable hack that makes numRows() work in Oracle


[ Top ]



DB_PORTABILITY_RTRIM [line 277]

DB_PORTABILITY_RTRIM = 2
Right trim the data output by get*() and fetch*()


[ Top ]



DB_TABLEINFO_FULL [line 245]

DB_TABLEINFO_FULL = 3

[ Top ]



DB_TABLEINFO_ORDER [line 243]

DB_TABLEINFO_ORDER = 1
The type of information to return from the tableInfo() method.

Bitwised constants, so they can be combined using | and removed using ^.




Tags:

see:  tableInfo()

[ Top ]



DB_TABLEINFO_ORDERTABLE [line 244]

DB_TABLEINFO_ORDERTABLE = 2

[ Top ]




Documentation generated on Thu, 04 May 2006 19:47:27 -0600 by phpDocumentor 1.3.0RC4