This is the expDatabase subsystem Handles all database abstraction in Exponent.
package |
Subsystems |
---|---|
subpackage |
Subsystems |
_flatten(array|string $a, string $join = ' AND ') : string
array|string
Array to join
string
Glue for the concatenation
string
Joined string
backends(integer $valid_only = 1) : Array
This function looks for available database engines, and then returns an array to the caller.
integer
Array
An associative array of engine identifiers. The internal engine name is the key, and the external descriptive name is the value.
bind( &$a, \* $val, integer $type) : string
\*
Value to bind
integer
PDO field type
string
Bound key to be used in the SQL where this parameter would be used.
complex(array $request, $table, $primaryKey, $columns, $whereResult = null, $whereAll = null)
array
Data sent to server by DataTables @param string $table SQL table to query @param string $primaryKey Primary key of the table @param array $columns Column information array @param string $whereResult WHERE condition to apply to the result set @param string $whereAll WHERE condition to apply to all queries
@return array Server-side processing response array
connect(string $username, string $password, string $hostname, string $database, string $dbclass = '', boolean $new = false, null $log = null) : \database
This function attempts to connect to the exponent database, and then returns the database object to the caller.
string
the database username
string
the database password
string
the url of the database server
string
the name of the database
string
boolean
null
\database
the database object
data_output( $columns, array $data)
@param array $columns Column information array
array
Data from the SQL get @return array Formatted data in a row based format
fatal(string $msg)
This writes out an error message in a JSON string which DataTables will see and show to the user in the browser.
string
Message to send to the client
filter(array $request, $columns, &$bindings)
Construct the WHERE clause for server-side processing SQL query.
NOTE this does not match the built-in DataTables filtering which does it word by word on any field. It's possible to do here performance on large databases would be very poor
array
Data sent to server by DataTables @param array $columns Column information array @param array $bindings Array of values for PDO bindings, used in the sql_exec() function @return string SQL where clause
fix_table_names()
install_dbtables( $aggressive = false, $workflow = ENABLE_WORKFLOW)
limit(array $request, $columns)
Construct the LIMIT clause for server-side processing SQL query
array
Data sent to server by DataTables @param array $columns Column information array @return string SQL limit clause
order(array $request, $columns)
Construct the ORDER BY clause for server-side processing SQL query
array
Data sent to server by DataTables @param array $columns Column information array @return string SQL order by clause
pluck( $a, string $prop)
@param array $a Array to get data from
string
Property to read @return array Array of property values
simple( $request, string $table, $primaryKey, $columns)
@param array $request Data sent to server by DataTables
string
SQL table to query @param string $primaryKey Primary key of the table @param array $columns Column information array @return array Server-side processing response array
sql_connect() : \PDO
\PDO
Database connection handle
sql_exec(resource $dbpdo, array $bindings, string $sql = null) : array
resource
Database handler
array
Array of PDO binding values from bind() to be used for safely escaping strings. Note that this can be given as the SQL query string if no bindings are required.
string
SQL query to execute.
array
Result from the query (all rows)