Class jDbTools

Description

Provides utilities methods for a database

  • abstract:

Located in /db/jDbTools.class.php (line 100)


	
			
Direct descendents
Class Description
mysqlDbTools Provides utilities methods for a mysql database
intuitionDbTools
ociDbTools
sqliteDbTools tools to manage a sqlite database
pgsqlDbTools
mssqlDbTools
Variable Summary
Method Summary
jDbTools __construct ( $connector)
string encloseName (string $fieldName)
string escapeValue (string $unifiedType, mixed $value, [ $checkNull = false], [ $toPhpSource = false])
void execSQLScript ( $file)
string getBooleanValue (string|boolean $value)
array getFieldList (string $tableName, [string $sequence = ''])
void getTableList ()
array getTypeInfo (string $nativeType)
string stringToPhpValue (string $unifiedType, string $value, [ $checkNull = false])
string unifiedToPHPType (string $unifiedType)
Variables
mixed $dbmsStyle = array('/^\s*#/', '/;\s*$/') (line 276)

regular expression to detect comments and end of query

  • access: protected

Redefined in descendants as:
mixed $falseValue = '0' (line 104)
  • access: public

Redefined in descendants as:
mixed $trueValue = '1' (line 102)
  • access: public

Redefined in descendants as:
mixed $typesInfo = array() (line 138)
  • access: protected

Redefined in descendants as:
mixed $unifiedToPhp = array(
'boolean'=>'boolean',
'integer'=>'integer',
'float'=>'float',
'double'=>'float',
'numeric'=>'numeric',
'decimal'=>'decimal',
'date'=>'string',
'time'=>'string',
'datetime'=>'string',
'year'=>'string',
'char'=>'string',
'varchar'=>'string',
'text'=>'string',
'blob'=>'string',
'binary'=>'string',
'varbinary'=>'string',
)
(line 119)
  • access: protected
jDbConnection $_conn (line 110)

the database connector

  • access: protected
Methods
Constructor __construct (line 115)
jDbTools __construct ( $connector)
  • $connector

Redefined in descendants as:
encloseName (line 256)

enclose the field name

  • return: the enclosed field name
  • since: 1.2
  • access: public
string encloseName (string $fieldName)
  • string $fieldName: the field name

Redefined in descendants as:
escapeValue (line 205)
  • return: the value which is ready to include a SQL query string
  • since: 1.2
  • access: public
string escapeValue (string $unifiedType, mixed $value, [ $checkNull = false], [ $toPhpSource = false])
  • string $unifiedType: the unified type name
  • mixed $value: the value
  • $checkNull
  • $toPhpSource
execSQLScript (line 278)
  • access: public
void execSQLScript ( $file)
  • $file

Redefined in descendants as:
getBooleanValue (line 241)
  • return: the string value representing a boolean in SQL
  • since: 1.2
  • access: public
string getBooleanValue (string|boolean $value)
  • string|boolean $value: a value which is a boolean
getFieldList (line 271)

retrieve the list of fields of a table

  • return: keys are field names and values are jDbFieldProperties objects
  • abstract:
  • access: public
array getFieldList (string $tableName, [string $sequence = ''])
  • string $tableName: the name of the table
  • string $sequence: the sequence used to auto increment the primary key

Redefined in descendants as:
getTableList (line 263)

returns the table list

  • abstract:
  • access: public
void getTableList ()

Redefined in descendants as:
getTypeInfo (line 149)

get informations about the given SQL type

  • return: an array which contains characteristics of the type array ( 'nativetype', 'corresponding unifiedtype', minvalue, maxvalue, minlength, maxlength) minvalue, maxvalue, minlength, maxlength can be null.
  • since: 1.2
  • access: public
array getTypeInfo (string $nativeType)
  • string $nativeType: the SQL type
stringToPhpValue (line 178)
  • return: the php value corresponding to the type
  • since: 1.2
  • access: public
string stringToPhpValue (string $unifiedType, string $value, [ $checkNull = false])
  • string $unifiedType: the unified type name
  • string $value: the value
  • $checkNull
unifiedToPHPType (line 165)

return the PHP type corresponding to the given unified type

  • return: the php type
  • since: 1.2
  • access: public
string unifiedToPHPType (string $unifiedType)
  • string $unifiedType

Documentation generated on Thu, 19 Sep 2013 00:04:12 +0200 by phpDocumentor 1.4.3