databaseDefine a database. This is a parent class to all of the supported
database flavours. It holds the main data describing a database and it's connection. The actual functionality to connect to a physical database and access its data is defined in the child classes of this one. For example, see file 'db-postgres.php'.
Normal users of the system should not have to deal with this class directly.
The datasources class is a container for multiple 'databases' or instances of this class.
Located in /database-defs.php (line 584)
database
database
([string $name = ""], [string $user = ""], [string $passwd = ""], [string $host = ""], integer $port, [string $enc = ""], [string $datestyle = ""])
mixed
$connected
= false (line 603)
Flag true if database was connected ok
mixed
$datestyle
= "UNICODE" (line 599)
The database internal date format/style
mixed
$dbid
= false (line 611)
Unique identifier for database access
mixed
$enc
= "" (line 601)
The database character encoding
mixed
$executable_sql
= "" (line 615)
The SQL statement last executed on this database. This
mixed
$host
= "" (line 591)
Host server of this database
mixed
$name
= "" (line 589)
Name of this database
mixed
$passwd
= "" (line 597)
Default password to connect as
mixed
$persistent
= false (line 608)
True if we want a persistent connection
mixed
$port
= 0 (line 593)
Port to access it via TCP
mixed
$rid
(line 619)
The result ID last returned by a query on this DB. Also
mixed
$timer
(line 622)
Microtimer for query execute timing
mixed
$type
= "" (line 587)
Type of database eg: "postgres", "mssql_server"..
mixed
$user
= "" (line 595)
Default user to connect as
Constructor
This method must be defined in the child class.
Return a Php boolean from a database field value. The database field is expected to be a container of some form of logical value. Here is where we convert it according to the current database.
Make conversions of boolean syntax found in the SQL string and return the 'standardised' SQL. This assumes that Axyl SQL will be written in the form 'WHERE foo=TRUE'.
Return the current sequence value, given a sequence name, the table and the field it applies to.
Return a suitable database field value to contain the value for the given boolean.
This method must be defined in the child class.
This method may be over-ridden in the child class. The default is to apply a rather simplistic SQL-standard transformation of single quote to doubled-up single-quote ' --> ''.
This method must be defined in the child class.
This method must be defined in the child class.
This method must be defined in the child class.
Return the next sequence value, given a sequence name, the table and the field it applies to.
This method must be defined in the child class.
This method must be defined in the child class.
This method must be defined in the child class.
Given an Axyl SQL query object, build the SQL string from it in suitable format for the currently connected database server.
This method may be over-ridden in the child class. The default action is to simply do nothing.
Documentation generated by phpDocumentor 1.3.0RC3