$connector
$connector : array
this is an array of to hold connection objects to each DSN that is called by the application
Interface DATA_API
introspectTable( $DSN, string $tableName) : \JCORE\DATA\API\obj
DESCRIPTOR: GET A TABLE DEFINITION (only MySQL for now) This method passes the connection object to the introspection class make this agnostic, pass to connection object
$DSN | ||
string | $tableName |
set_connection(string $DSN, array $settings) : boolean
DESCRIPTOR: (RE)SETS A CONNECTION OBJECT TO THE POOL $settings expected to be $this->connectorCfg[$DSN] this resets the whole connection object the DSN & settings are set in INI/config.dbConnectionPool.ini $settings[persistent] from INI can be over ridden here set it as a boolean or a string $settings["implementation"] allows a class to be defined @ runtime in config.dbConnection.ini the connection object also has a set_connection method to reset the connection resource
string | $DSN | |
array | $settings |
true
retrieve(string $DSN, string $query, array $args = array('returnArray' => true)) : \JCORE\DATA\API\$result
DESCRIPTOR: EXECUTE A SELECT if $returnArray === true the function will return the result as a PHP array use stdobj to get an object back $args[returnArray] = true
string | $DSN | |
string | $query | |
array | $args |
update(string $DSN, string $query, $args = array('returnArray' => true)) : \JCORE\DATA\API\$result
DESCRIPTOR: EXECUTE AN UPDATE if $returnArray === true the function will return the number of affected rows as well as the "mysql_info" from the query
string | $DSN | |
string | $query | |
$args |
create(string $DSN, string $query, array $args = array('returnArray' => true)) : \JCORE\DATA\API\$result
DESCRIPTOR: EXECUTE AN INSERT if $returnArray === true the function will return the "mysql_insert_id" the number of "mysql_affected_rows" as well as the "mysql_info" from the query
string | $DSN | |
string | $query | |
array | $args |
delete(string $DSN, string $query, $args = array('returnArray' => true)) : \JCORE\DATA\API\bool/array
DESCRIPTOR: EXECUTE A DELETE if $returnArray === true the function will return the number of affected rows as well as the "mysql_info" from the query
string | $DSN | |
string | $query | |
$args |
$result
resultToAssoc(resource $result, string $DSN) : array
must be maintained allow pass-trough PASSED DOWN TO THE CONNECCTION OBJECT DESCRIPTOR: converts a SQL result to a PHP array
HACKING THIS.... for the time being a local mysql only implementation Just to keep the name space consistent from the beginning
resource | $result | |
string | $DSN |
$result