diff --git a/classes/db_pdo.php b/classes/db_pdo.php index 43da9dc..e2d7bea 100644 --- a/classes/db_pdo.php +++ b/classes/db_pdo.php @@ -522,13 +522,5 @@ abstract class DB_PDO extends PDO { * @return void */ abstract public function truncate($table); - - /** - * Connect to a different database - * - * @param string $name - * @return void - */ - abstract public function switch_db($name); } // End of db_pdo.php \ No newline at end of file diff --git a/classes/db_util.php b/classes/db_util.php index 7102d5b..da9ffac 100644 --- a/classes/db_util.php +++ b/classes/db_util.php @@ -95,4 +95,5 @@ abstract class DB_Util { */ abstract public function backup_data(); -} \ No newline at end of file +} +// End of db_util.php \ No newline at end of file diff --git a/classes/db_sql.php b/classes/idb_sql.php similarity index 70% rename from classes/db_sql.php rename to classes/idb_sql.php index b41e046..b1e373a 100644 --- a/classes/db_sql.php +++ b/classes/idb_sql.php @@ -14,12 +14,12 @@ // -------------------------------------------------------------------------- /** - * Abstract parent for database manipulation subclasses + * parent for database manipulation subclasses * * @package Query * @subpackage Query */ -abstract class DB_SQL { +interface iDB_SQL { /** * Get database specific sql for limit clause @@ -30,7 +30,7 @@ abstract class DB_SQL { * @param int $offset * @return string */ - abstract public function limit($sql, $limit, $offset=FALSE); + public function limit($sql, $limit, $offset=FALSE); /** * Get the sql for random ordering @@ -38,70 +38,70 @@ abstract class DB_SQL { * @abstract * @return string */ - abstract public function random(); + public function random(); /** * Returns sql to list other databases * * @return string */ - abstract public function db_list(); + public function db_list(); /** * Returns sql to list tables * * @return string */ - abstract public function table_list(); + public function table_list(); /** * Returns sql to list system tables * * @return string */ - abstract public function system_table_list(); + public function system_table_list(); /** * Returns sql to list views * * @return string */ - abstract public function view_list(); + public function view_list(); /** * Returns sql to list triggers * * @return string */ - abstract public function trigger_list(); + public function trigger_list(); /** * Return sql to list functions * * @return FALSE */ - abstract public function function_list(); + public function function_list(); /** * Return sql to list stored procedures * * @return string */ - abstract public function procedure_list(); + public function procedure_list(); /** * Return sql to list sequences * * @return string */ - abstract public function sequence_list(); + public function sequence_list(); /** * Return sql to list database field types * * @return mixed */ - abstract public function type_list(); + public function type_list(); /** * Get information about the columns in the @@ -110,6 +110,6 @@ abstract class DB_SQL { * @param string * @return string */ - abstract public function column_list($table); + public function column_list($table); } // End of db_sql.php \ No newline at end of file diff --git a/classes/iquery_builder.php b/classes/iquery_builder.php new file mode 100644 index 0000000..8af659a --- /dev/null +++ b/classes/iquery_builder.php @@ -0,0 +1,480 @@ +db->sql public $sql; @@ -82,10 +82,10 @@ class Query_Builder { // 'conjunction' => ' AND ', // 'string' => 'k=?' // ) - private $query_map; + protected $query_map; // Map for having clause - private $having_map; + protected $having_map; // Convenience property for connection management public $conn_name = ""; @@ -103,7 +103,7 @@ class Query_Builder { * @param DB_PDO $db * @param object $params - the connection parameters */ - public function __construct(&$db, &$params) + public function __construct(&$db, $params) { $this->db = $db; @@ -176,7 +176,7 @@ class Query_Builder { * @param string $as * @return string */ - private function _select($field, $as = FALSE) + protected function _select($field, $as = FALSE) { // Escape the identifiers $field = $this->db->quote_ident($field); @@ -304,7 +304,7 @@ class Query_Builder { * @param string $conj * @return $this */ - private function _like($field, $val, $pos, $like='LIKE', $conj='AND') + protected function _like($field, $val, $pos, $like='LIKE', $conj='AND') { $field = $this->db->quote_ident($field); @@ -408,7 +408,7 @@ class Query_Builder { * @param string $conj * @return $this */ - private function _having($key, $val=array(), $conj='AND') + protected function _having($key, $val=array(), $conj='AND') { $where = $this->_where($key, $val); @@ -473,7 +473,7 @@ class Query_Builder { * @param mixed $val * @return array */ - private function _where($key, $val=array()) + protected function _where($key, $val=array()) { $where = array(); @@ -506,7 +506,7 @@ class Query_Builder { * @param string $conj * @return $this */ - private function _where_string($key, $val=array(), $conj='AND') + protected function _where_string($key, $val=array(), $conj='AND') { $where = $this->_where($key, $val); @@ -544,7 +544,7 @@ class Query_Builder { * @param string * @return $this */ - private function _where_in($key, $val=array(), $in='IN', $conj='AND') + protected function _where_in($key, $val=array(), $in='IN', $conj='AND') { $key = $this->db->quote_ident($key); $params = array_fill(0, count($val), '?'); @@ -1056,7 +1056,7 @@ class Query_Builder { } // -------------------------------------------------------------------------- - // ! Query Returning Methods + // ! SQL Returning Methods // -------------------------------------------------------------------------- /** @@ -1094,7 +1094,7 @@ class Query_Builder { // -------------------------------------------------------------------------- /** - * Returns the generated 'insert' sql query + * Returns the generated 'update' sql query * * @param string $table * @param bool $reset @@ -1108,7 +1108,7 @@ class Query_Builder { // -------------------------------------------------------------------------- /** - * Returns the generated 'insert' sql query + * Returns the generated 'delete' sql query * * @param string $table * @param bool $reset @@ -1129,7 +1129,7 @@ class Query_Builder { * @param bool * @resturn string */ - private function _get_compile($type, $table, $reset) + protected function _get_compile($type, $table, $reset) { $sql = $this->_compile($type, $table); @@ -1185,7 +1185,7 @@ class Query_Builder { * @param bool $simple * @return mixed */ - private function _run($type, $table, $simple=FALSE) + protected function _run($type, $table, $simple=FALSE) { $sql = $this->_compile($type, $table); $vals = array_merge($this->values, (array) $this->where_values); @@ -1227,7 +1227,7 @@ class Query_Builder { * @param string $table * @return $string */ - private function _compile($type='', $table='') + protected function _compile($type='', $table='') { $sql = ''; diff --git a/common.php b/common.php index 73f6baa..7709a76 100644 --- a/common.php +++ b/common.php @@ -192,7 +192,7 @@ function Query($params = '') $db->table_prefix = $params->prefix; } - // Create the database connection + // Create the Query Builder object $conn = new Query_Builder($db, $params); // Save it for later diff --git a/docs/classes.svg b/docs/classes.svg index 924d2de..c6e864a 100644 --- a/docs/classes.svg +++ b/docs/classes.svg @@ -10,14 +10,14 @@ G cluster_default - + - - - - + + + + \\Query_Parser @@ -26,16 +26,8 @@ Query_Parser - -\\DB_SQL - - -«abstract» -DB_SQL - - -\\DB_PDO +\\DB_PDO «abstract» @@ -43,7 +35,7 @@ -\\PDO +\\PDO \PDO @@ -53,14 +45,33 @@ -\\Query_Builder +\\Query_Builder Query_Builder + +\\iQuery_Builder + + +iQuery_Builder + + + +\\Query_Builder->\\iQuery_Builder + + + + +\\iDB_SQL + + +iDB_SQL + + -\\DB_Util +\\DB_Util «abstract» @@ -68,14 +79,14 @@ -\\BadDBDriverException +\\BadDBDriverException BadDBDriverException -\\InvalidArgumentException +\\InvalidArgumentException \InvalidArgumentException @@ -85,14 +96,14 @@ -\\BadConnectionException +\\BadConnectionException BadConnectionException -\\UnexpectedValueException +\\UnexpectedValueException \UnexpectedValueException @@ -102,199 +113,199 @@ -\\PgSQL_SQL +\\PgSQL_SQL PgSQL_SQL - -\\PgSQL_SQL->\\DB_SQL - - + +\\PgSQL_SQL->\\iDB_SQL + + -\\PgSQL_Util +\\PgSQL_Util PgSQL_Util -\\PgSQL_Util->\\DB_Util +\\PgSQL_Util->\\DB_Util -\\PgSQL +\\PgSQL PgSQL -\\PgSQL->\\DB_PDO +\\PgSQL->\\DB_PDO -\\ODBC_Util +\\ODBC_Util ODBC_Util -\\ODBC_Util->\\DB_Util +\\ODBC_Util->\\DB_Util -\\ODBC_SQL +\\ODBC_SQL ODBC_SQL - -\\ODBC_SQL->\\DB_SQL - - + +\\ODBC_SQL->\\iDB_SQL + + -\\ODBC +\\ODBC ODBC -\\ODBC->\\DB_PDO +\\ODBC->\\DB_PDO -\\MySQL_Util +\\MySQL_Util MySQL_Util -\\MySQL_Util->\\DB_Util +\\MySQL_Util->\\DB_Util -\\MySQL +\\MySQL MySQL -\\MySQL->\\DB_PDO +\\MySQL->\\DB_PDO -\\MySQL_SQL +\\MySQL_SQL MySQL_SQL - -\\MySQL_SQL->\\DB_SQL - - + +\\MySQL_SQL->\\iDB_SQL + + -\\SQLite_Util +\\SQLite_Util SQLite_Util -\\SQLite_Util->\\DB_Util +\\SQLite_Util->\\DB_Util -\\SQLite +\\SQLite SQLite -\\SQLite->\\DB_PDO +\\SQLite->\\DB_PDO -\\SQLite_SQL +\\SQLite_SQL SQLite_SQL - -\\SQLite_SQL->\\DB_SQL - - + +\\SQLite_SQL->\\iDB_SQL + + -\\Firebird_SQL +\\Firebird_SQL Firebird_SQL - -\\Firebird_SQL->\\DB_SQL - - + +\\Firebird_SQL->\\iDB_SQL + + -\\Firebird_Result +\\Firebird_Result Firebird_Result -\\PDOStatement +\\PDOStatement \PDOStatement -\\Firebird_Result->\\PDOStatement +\\Firebird_Result->\\PDOStatement -\\Firebird +\\Firebird Firebird -\\Firebird->\\DB_PDO +\\Firebird->\\DB_PDO -\\Firebird_Util +\\Firebird_Util Firebird_Util -\\Firebird_Util->\\DB_Util +\\Firebird_Util->\\DB_Util diff --git a/docs/classes/BadConnectionException.html b/docs/classes/BadConnectionException.html index 1852489..248aae3 100644 --- a/docs/classes/BadConnectionException.html +++ b/docs/classes/BadConnectionException.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -219,7 +219,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/BadDBDriverException.html b/docs/classes/BadDBDriverException.html index fcef3f8..cc3bb1a 100644 --- a/docs/classes/BadDBDriverException.html +++ b/docs/classes/BadDBDriverException.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -219,7 +219,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/DB_PDO.html b/docs/classes/DB_PDO.html index f8a218d..38e2f75 100644 --- a/docs/classes/DB_PDO.html +++ b/docs/classes/DB_PDO.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -116,7 +116,6 @@ the connection/database
    get_system_tables()
    rollBack()
  • setAttribute()
    setAttribute()
  • -
  • Connect to a different database
    switch_db()
  • Empty the passed table
    truncate()
  • Sets the table prefix on the passed string
    _prefix()
  • @@ -656,19 +655,6 @@ the connection/database -
    -

    Connect to a different database

    -
    switch_db(string $name) : void
    -
    -
    -

    -

    Parameters

    -
    -

    $name

    -string -
    -
    -

    Empty the passed table

    truncate(string $table) : void
    @@ -757,7 +743,7 @@ the connection/database
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/DB_SQL.html b/docs/classes/DB_SQL.html index 23465d8..a5352e4 100644 --- a/docs/classes/DB_SQL.html +++ b/docs/classes/DB_SQL.html @@ -244,7 +244,7 @@ specified table
    + generated on 2012-11-09T15:10:09-05:00.
    diff --git a/docs/classes/DB_Util.html b/docs/classes/DB_Util.html index b4de4fa..6847fd5 100644 --- a/docs/classes/DB_Util.html +++ b/docs/classes/DB_Util.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -210,7 +210,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/Firebird.html b/docs/classes/Firebird.html index 76ecd60..fd1b3a0 100644 --- a/docs/classes/Firebird.html +++ b/docs/classes/Firebird.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -108,7 +108,6 @@ the connection/database
    get_system_tables()
  • Rollback a transaction
    rollBack()
  • setAttribute()
    setAttribute()
  • -
  • Doesn't apply to Firebird
    switch_db()
  • Empty a database table
    truncate()
  • Sets the table prefix on the passed string
    _prefix()
  • @@ -781,21 +780,6 @@ the connection/database -
    -

    Doesn't apply to Firebird

    -
    switch_db(string $name) : FALSE
    -
    -
    -

    -

    Parameters

    -
    -

    $name

    -string -
    -

    Returns

    -
    FALSE
    -
    -

    Empty a database table

    truncate(string $table) : void
    @@ -941,7 +925,7 @@ the last query executed
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/Firebird_Result.html b/docs/classes/Firebird_Result.html index 9533155..89f586e 100644 --- a/docs/classes/Firebird_Result.html +++ b/docs/classes/Firebird_Result.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -505,7 +505,7 @@ the query
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/Firebird_SQL.html b/docs/classes/Firebird_SQL.html index 9dabb1d..de09374 100644 --- a/docs/classes/Firebird_SQL.html +++ b/docs/classes/Firebird_SQL.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -234,7 +234,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/Firebird_Util.html b/docs/classes/Firebird_Util.html index 6313f07..c7bbb17 100644 --- a/docs/classes/Firebird_Util.html +++ b/docs/classes/Firebird_Util.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -213,7 +213,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/MySQL.html b/docs/classes/MySQL.html index 27e15f3..b5aed9a 100644 --- a/docs/classes/MySQL.html +++ b/docs/classes/MySQL.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -116,7 +116,6 @@ the connection/database
    get_system_tables()
    rollBack()
  • setAttribute()
    setAttribute()
  • -
  • Connect to a different database
    switch_db()
  • Empty a table
    truncate()
  • Sets the table prefix on the passed string
    _prefix()
  • @@ -838,19 +837,6 @@ the connection/database -
    -

    Connect to a different database

    -
    switch_db(string $name) : void
    -
    -
    -

    -

    Parameters

    -
    -

    $name

    -string -
    -
    -

    Empty a table

    truncate(string $table) : void
    @@ -977,7 +963,7 @@ the connection/database
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/MySQL_SQL.html b/docs/classes/MySQL_SQL.html index 7beee03..a4d1e0d 100644 --- a/docs/classes/MySQL_SQL.html +++ b/docs/classes/MySQL_SQL.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -239,7 +239,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/MySQL_Util.html b/docs/classes/MySQL_Util.html index 673fc45..5b50eaf 100644 --- a/docs/classes/MySQL_Util.html +++ b/docs/classes/MySQL_Util.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -209,7 +209,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/ODBC.html b/docs/classes/ODBC.html index bdb7dcc..0a12641 100644 --- a/docs/classes/ODBC.html +++ b/docs/classes/ODBC.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -116,7 +116,6 @@ the connection/database
    get_system_tables()
    rollBack()
  • setAttribute()
    setAttribute()
  • -
  • Doesn't apply to ODBC
    switch_db()
  • Empty the current database
    truncate()
  • Sets the table prefix on the passed string
    _prefix()
  • @@ -838,21 +837,6 @@ the connection/database -
    -

    Doesn't apply to ODBC

    -
    switch_db(string $name) : bool
    -
    -
    -

    -

    Parameters

    -
    -

    $name

    -string -
    -

    Returns

    -
    bool
    -
    -

    Empty the current database

    truncate(string $table) : void
    @@ -979,7 +963,7 @@ the connection/database
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/ODBC_SQL.html b/docs/classes/ODBC_SQL.html index a92e98e..e87d8f2 100644 --- a/docs/classes/ODBC_SQL.html +++ b/docs/classes/ODBC_SQL.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -234,7 +234,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/ODBC_Util.html b/docs/classes/ODBC_Util.html index cdedbb8..75c0a04 100644 --- a/docs/classes/ODBC_Util.html +++ b/docs/classes/ODBC_Util.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -204,7 +204,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/PgSQL.html b/docs/classes/PgSQL.html index ee9c249..5b3f29b 100644 --- a/docs/classes/PgSQL.html +++ b/docs/classes/PgSQL.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -116,7 +116,6 @@ the connection/database
    get_system_tables()
    rollBack()
  • setAttribute()
    setAttribute()
  • -
  • Connect to a different database
    switch_db()
  • Empty a table
    truncate()
  • Sets the table prefix on the passed string
    _prefix()
  • @@ -834,19 +833,6 @@ the connection/database -
    -

    Connect to a different database

    -
    switch_db(string $name) : void
    -
    -
    -

    -

    Parameters

    -
    -

    $name

    -string -
    -
    -

    Empty a table

    truncate(string $table) : void
    @@ -979,7 +965,7 @@ the connection/database
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/PgSQL_SQL.html b/docs/classes/PgSQL_SQL.html index 7ef7e8a..c3bc24f 100644 --- a/docs/classes/PgSQL_SQL.html +++ b/docs/classes/PgSQL_SQL.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -234,7 +234,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/PgSQL_Util.html b/docs/classes/PgSQL_Util.html index 173c8ac..cf8f98e 100644 --- a/docs/classes/PgSQL_Util.html +++ b/docs/classes/PgSQL_Util.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -209,7 +209,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/Query_Builder.html b/docs/classes/Query_Builder.html index ba77857..c132365 100644 --- a/docs/classes/Query_Builder.html +++ b/docs/classes/Query_Builder.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -70,10 +70,10 @@ in place of the get() method
    count_all_results()
  • Select and retrieve all records from the current table, and/or execute current compiled query
    get()
  • -
  • Returns the generated 'insert' sql query
    get_compiled_delete()
  • +
  • Returns the generated 'delete' sql query
    get_compiled_delete()
  • Returns the generated 'insert' sql query
    get_compiled_insert()
  • Returns the generated 'select' sql query
    get_compiled_select()
  • -
  • Returns the generated 'insert' sql query
    get_compiled_update()
  • +
  • Returns the generated 'update' sql query
    get_compiled_update()
  • Convience method for get() with a where clause
    get_where()
  • Group the results by the selected field(s)
    group_by()
  • Ends a query group
    group_end()
  • @@ -112,36 +112,36 @@ Note: this function works with key / value, or a passed array with key / value pairs
    where()
  • Where clause with 'IN' statement
    where_in()
  • WHERE NOT IN (FOO) clause
    where_not_in()
  • - -
  • String together the sql statements for sending to the db
    _compile()
  • -
  • Helper function for returning sql strings
    _get_compile()
  • -
  • Simplify building having clauses
    _having()
  • -
  • Simplify 'like' methods
    _like()
  • -
  • Executes the compiled query
    _run()
  • -
  • Method to simplify select_ methods
    _select()
  • -
  • Do all the repeditive stuff for where/having type methods
    _where()
  • -
  • Simplify where_in methods
    _where_in()
  • -
  • Simplify generating where string
    _where_string()
  • + +
  • String together the sql statements for sending to the db
    _compile()
  • +
  • Helper function for returning sql strings
    _get_compile()
  • +
  • Simplify building having clauses
    _having()
  • +
  • Simplify 'like' methods
    _like()
  • +
  • Executes the compiled query
    _run()
  • +
  • Method to simplify select_ methods
    _select()
  • +
  • Do all the repeditive stuff for where/having type methods
    _where()
  • +
  • Simplify where_in methods
    _where_in()
  • +
  • Simplify generating where string
    _where_string()
  • $conn_name
    $conn_name
  • $queries
    $queries
  • $sql
    $sql
  • - -
  • $from_string
    $from_string
  • -
  • $group_array
    $group_array
  • -
  • $group_string
    $group_string
  • -
  • $having_map
    $having_map
  • -
  • $limit
    $limit
  • -
  • $offset
    $offset
  • -
  • $order_array
    $order_array
  • -
  • $order_string
    $order_string
  • -
  • $query_map
    $query_map
  • -
  • $select_string
    $select_string
  • -
  • $set_array_keys
    $set_array_keys
  • -
  • $set_string
    $set_string
  • -
  • $values
    $values
  • -
  • $where_values
    $where_values
  • + +
  • $from_string
    $from_string
  • +
  • $group_array
    $group_array
  • +
  • $group_string
    $group_string
  • +
  • $having_map
    $having_map
  • +
  • $limit
    $limit
  • +
  • $offset
    $offset
  • +
  • $order_array
    $order_array
  • +
  • $order_string
    $order_string
  • +
  • $query_map
    $query_map
  • +
  • $select_string
    $select_string
  • +
  • $set_array_keys
    $set_array_keys
  • +
  • $set_string
    $set_string
  • +
  • $values
    $values
  • +
  • $where_values
    $where_values
  • @@ -308,7 +308,7 @@ execute current compiled query
    -

    Returns the generated 'insert' sql query

    +

    Returns the generated 'delete' sql query

    get_compiled_delete(string $table, bool $reset) : string
    @@ -365,7 +365,7 @@ execute current compiled query
    -

    Returns the generated 'insert' sql query

    +

    Returns the generated 'update' sql query

    get_compiled_update(string $table, bool $reset) : string
    @@ -1028,7 +1028,7 @@ passed array with key / value pairs
    -
    +

    String together the sql statements for sending to the db

    _compile(string $type, string $table) : \$string
    @@ -1047,7 +1047,7 @@ passed array with key / value pairs
    \$string
    -
    +

    Helper function for returning sql strings

    _get_compile(string $type, string $table, $reset) 
    @@ -1071,7 +1071,7 @@ passed array with key / value pairs

    bool

    -
    +

    Simplify building having clauses

    _having(mixed $key, mixed $val, string $conj) : \Query_Builder
    @@ -1098,7 +1098,7 @@ passed array with key / value pairs
    -
    +

    Simplify 'like' methods

    _like(string $field, mixed $val, string $pos, string $like, string $conj) : \Query_Builder
    @@ -1133,7 +1133,7 @@ passed array with key / value pairs
    -
    +

    Executes the compiled query

    _run(string $type, string $table, bool $simple) : mixed
    @@ -1156,7 +1156,7 @@ passed array with key / value pairs
    mixed
    -
    +

    Method to simplify select_ methods

    _select(string $field, string $as) : string
    @@ -1175,7 +1175,7 @@ passed array with key / value pairs
    string
    -
    +

    Do all the repeditive stuff for where/having type methods

    _where(mixed $key, mixed $val) : array
    @@ -1194,7 +1194,7 @@ passed array with key / value pairs
    array
    -
    +

    Simplify where_in methods

    _where_in(mixed $key, mixed $val, $in, $conj) : \Query_Builder
    @@ -1223,7 +1223,7 @@ passed array with key / value pairs
    -
    +

    Simplify generating where string

    _where_string(mixed $key, mixed $val, string $conj) : \Query_Builder
    @@ -1270,85 +1270,85 @@ passed array with key / value pairs

    - 
    + 

    $from_string

    $from_string 

    - 
    + 

    $group_array

    $group_array 

    - 
    + 

    $group_string

    $group_string 

    - 
    + 

    $having_map

    $having_map 

    - 
    + 

    $limit

    $limit 

    - 
    + 

    $offset

    $offset 

    - 
    + 

    $order_array

    $order_array 

    - 
    + 

    $order_string

    $order_string 

    - 
    + 

    $query_map

    $query_map 

    - 
    + 

    $select_string

    $select_string 

    - 
    + 

    $set_array_keys

    $set_array_keys 

    - 
    + 

    $set_string

    $set_string 

    - 
    + 

    $values

    $values 

    - 
    + 

    $where_values

    $where_values 
    @@ -1361,7 +1361,7 @@ passed array with key / value pairs
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/Query_Builder_Base.html b/docs/classes/Query_Builder_Base.html new file mode 100644 index 0000000..4603bd8 --- /dev/null +++ b/docs/classes/Query_Builder_Base.html @@ -0,0 +1,349 @@ + + + + + +Query » \Query_Builder_Base + + + + + + + + + + +
    + +
    + +
    +
    +

    Base class for Query Bulder - Encapsulates protected methods

    +
    +

    + + + + + + + + + +
    packageQuery
    subpackageQuery
    +

    + Methods

    +
    +

    Calls a function further down the inheritence chain

    +
    __call(string $name, array $params) : mixed
    +
    +
    +

    +

    Parameters

    +
    +

    $name

    +string +
    +
    +

    $params

    +array +
    +

    Returns

    +
    mixed
    +
    +
    +
    +

    Empty base constructor

    +
    __construct() 
    +
    +

    +
    +
    +

    String together the sql statements for sending to the db

    +
    _compile(string $type, string $table) : \$string
    +
    +
    +

    +

    Parameters

    +
    +

    $type

    +string +
    +
    +

    $table

    +string +
    +

    Returns

    +
    \$string
    +
    +
    +
    +

    Helper function for returning sql strings

    +
    _get_compile(string $type, string $table, $reset) 
    +
    +
    +

    + + + +
    resturnstring
    +

    Parameters

    +
    +

    $type

    +string +
    +
    +

    $table

    +string +
    +
    +

    $reset

    +

    bool

    +
    +
    +
    +

    Simplify building having clauses

    +
    _having(mixed $key, mixed $val, string $conj) : \Query_Builder_Base
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $key

    +mixed +
    +
    +

    $val

    +mixed +
    +
    +

    $conj

    +string +
    +

    Returns

    + +
    +
    +
    +

    Simplify 'like' methods

    +
    _like(string $field, mixed $val, string $pos, string $like, string $conj) : \Query_Builder_Base
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $field

    +string +
    +
    +

    $val

    +mixed +
    +
    +

    $pos

    +string +
    +
    +

    $like

    +string +
    +
    +

    $conj

    +string +
    +

    Returns

    + +
    +
    +
    +

    Executes the compiled query

    +
    _run(string $type, string $table, bool $simple) : mixed
    +
    +
    +

    +

    Parameters

    +
    +

    $type

    +string +
    +
    +

    $table

    +string +
    +
    +

    $simple

    +bool +
    +

    Returns

    +
    mixed
    +
    +
    +
    +

    Method to simplify select_ methods

    +
    _select(string $field, string $as) : string
    +
    +
    +

    +

    Parameters

    +
    +

    $field

    +string +
    +
    +

    $as

    +string +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Do all the repeditive stuff for where/having type methods

    +
    _where(mixed $key, mixed $val) : array
    +
    +
    +

    +

    Parameters

    +
    +

    $key

    +mixed +
    +
    +

    $val

    +mixed +
    +

    Returns

    +
    array
    +
    +
    +
    +

    Simplify where_in methods

    +
    _where_in(mixed $key, mixed $val, $in, $conj) : \Query_Builder_Base
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $key

    +mixed +
    +
    +

    $val

    +mixed +
    +
    +

    $in

    +

    string

    +
    +

    $conj

    +

    string

    +

    Returns

    + +
    +
    +
    +

    Simplify generating where string

    +
    _where_string(mixed $key, mixed $val, string $conj) : \Query_Builder_Base
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $key

    +mixed +
    +
    +

    $val

    +mixed +
    +
    +

    $conj

    +string +
    +

    Returns

    + +
    +
    +
    +
    +
    +
    +
    +
    + + diff --git a/docs/classes/Query_Parser.html b/docs/classes/Query_Parser.html index 49ab5ae..ea1a88f 100644 --- a/docs/classes/Query_Parser.html +++ b/docs/classes/Query_Parser.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -145,7 +145,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/SQLite.html b/docs/classes/SQLite.html index 4f30c91..105669f 100644 --- a/docs/classes/SQLite.html +++ b/docs/classes/SQLite.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -115,7 +115,6 @@ method if the database does not support 'TRUNCATE';
    empty_table()
    rollBack()
  • setAttribute()
    setAttribute()
  • -
  • Doesn't apply to sqlite
    switch_db()
  • Empty a table
    truncate()
  • Unload a database from the current connection
    unload_database()
  • @@ -842,19 +841,6 @@ method if the database does not support 'TRUNCATE';
    -
    -

    Doesn't apply to sqlite

    -
    switch_db(string $name) : void
    -
    -
    -

    -

    Parameters

    -
    -

    $name

    -string -
    -
    -

    Empty a table

    truncate(string $table) : void
    @@ -994,7 +980,7 @@ method if the database does not support 'TRUNCATE';
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/SQLite_SQL.html b/docs/classes/SQLite_SQL.html index aaf5207..12d4033 100644 --- a/docs/classes/SQLite_SQL.html +++ b/docs/classes/SQLite_SQL.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -234,7 +234,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/SQLite_Util.html b/docs/classes/SQLite_Util.html index e546bb4..dec4dd6 100644 --- a/docs/classes/SQLite_Util.html +++ b/docs/classes/SQLite_Util.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -209,7 +209,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/classes/iDB_PDO.html b/docs/classes/iDB_PDO.html new file mode 100644 index 0000000..3487053 --- /dev/null +++ b/docs/classes/iDB_PDO.html @@ -0,0 +1,417 @@ + + + + + +Query » \iDB_PDO + + + + + + + + + + +
    + +
    +
    +
    + +
    + +
    +
    +
    +

    Base Database class

    +
    +

    Extends PDO to simplify cross-database issues

    + + + + + + + + + +
    packageQuery
    subpackageQuery
    +

    + Methods

    +
    +

    PDO constructor wrapper

    +
    __construct(string $dsn) 
    +
    +
    +

    +

    Parameters

    +
    +

    $dsn

    +string +
    +
    +
    +
    +

    Returns number of rows affected by an INSERT, UPDATE, DELETE type query

    +
    affected_rows(\PDOStatement $statement) : int
    +
    +
    +

    +

    Parameters

    +
    +

    $statement

    +\PDOStatement +
    +

    Returns

    +
    int
    +
    +
    +
    +

    Method to simplify retreiving db results for meta-data queries

    +
    driver_query(string $sql, bool $filtered_index) : mixed
    +
    +
    +

    +

    Parameters

    +
    +

    $sql

    +string +
    +
    +

    $filtered_index

    +bool +
    +

    Returns

    +
    mixed
    +
    +
    +
    +

    Deletes all the rows from a table. Does the same as the truncate +method if the database does not support 'TRUNCATE';

    +
    empty_table(string $table) : mixed
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +string +
    +

    Returns

    +
    mixed
    +
    +
    +
    +

    Retrieve column information for the current database table

    +
    get_columns(string $table) : array
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +string +
    +

    Returns

    +
    array
    +
    +
    +
    +

    Return list of dbs for the current connection, if possible

    +
    get_dbs() : array
    +
    +
    +

    +

    Returns

    +
    array
    +
    +
    +
    +

    Return list of function for the current database

    +
    get_functions() : array
    +
    +
    +

    +

    Returns

    +
    array
    +
    +
    +
    +

    Return the last error for the current database connection

    +
    get_last_error() : string
    +
    +
    +

    +

    Returns

    +
    string
    +
    +
    +
    +

    Return list of stored procedures for the current database

    +
    get_procedures() : array
    +
    +
    +

    +

    Returns

    +
    array
    +
    +
    +
    +

    Retreives the data from a select query

    +
    get_query_data(\PDOStatement $statement) : array
    +
    +
    +

    +

    Parameters

    +
    +

    $statement

    +\PDOStatement +
    +

    Returns

    +
    array
    +
    +
    +
    +

    Return schemas for databases that list them

    +
    get_schemas() : array
    +
    +
    +

    +

    Returns

    +
    array
    +
    +
    +
    +

    Return list of sequences for the current database, if they exist

    +
    get_sequences() : array
    +
    +
    +

    +

    Returns

    +
    array
    +
    +
    +
    +

    Retreives an array of non-user-created tables for +the connection/database

    +
    get_system_tables() : array
    +
    +
    +

    +

    Returns

    +
    array
    +
    +
    +
    +

    Return list of tables for the current database

    +
    get_tables() : array
    +
    +
    +

    +

    Returns

    +
    array
    +
    +
    +
    +

    Return list of triggers for the current database

    +
    get_triggers() : array
    +
    +
    +

    +

    Returns

    +
    array
    +
    +
    +
    +

    Retrieve list of data types for the database

    +
    get_types() : array
    +
    +
    +

    +

    Returns

    +
    array
    +
    +
    +
    +

    Return list of views for the current database

    +
    get_views() : array
    +
    +
    +

    +

    Returns

    +
    array
    +
    +
    +
    +

    Return the number of rows returned for a SELECT query

    +
    num_rows() : int
    +
    +
    +

    + + + +
    see\http://us3.php.net/manual/en/pdostatement.rowcount.php#87110
    +

    Returns

    +
    int
    +
    +
    +
    +

    Create and execute a prepared statement with the provided parameters

    +
    prepare_execute(string $sql, array $params) : \PDOStatement
    +
    +
    +

    +

    Parameters

    +
    +

    $sql

    +string +
    +
    +

    $params

    +array +
    +

    Returns

    + +
    +
    +
    +

    Simplifies prepared statements for database queries

    +
    prepare_query(string $sql, array $data) : mixed
    +
    +
    +

    +

    Parameters

    +
    +

    $sql

    +string +
    +
    +

    $data

    +array +
    +

    Returns

    +
    +mixedPDOStatement / FALSE
    +
    +
    +
    +

    Surrounds the string with the databases identifier escape characters

    +
    quote_ident(mixed $ident) : string
    +
    +
    +

    +

    Parameters

    +
    +

    $ident

    +mixed +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Quote database table name, and set prefix

    +
    quote_table(string $table) : string
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +string +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Empty the passed table

    +
    truncate(string $table) : void
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +string +
    +
    +
    +
    +
    +
    +
    +
    +
    + + diff --git a/docs/classes/iDB_SQL.html b/docs/classes/iDB_SQL.html new file mode 100644 index 0000000..e42561a --- /dev/null +++ b/docs/classes/iDB_SQL.html @@ -0,0 +1,250 @@ + + + + + +Query » \iDB_SQL + + + + + + + + + + +
    + +
    + +
    +
    +

    parent for database manipulation subclasses

    +
    +

    + + + + + + + + + +
    packageQuery
    subpackageQuery
    +

    + Methods

    +
    +

    Get information about the columns in the +specified table

    +
    column_list($table) : string
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +

    string

    +

    Returns

    +
    string
    +
    +
    +
    +

    Returns sql to list other databases

    +
    db_list() : string
    +
    +
    +

    +

    Returns

    +
    string
    +
    +
    +
    +

    Return sql to list functions

    +
    function_list() : FALSE
    +
    +
    +

    +

    Returns

    +
    FALSE
    +
    +
    +
    +

    Get database specific sql for limit clause

    +
    limit(string $sql, int $limit, int $offset) : string
    +
    +
    +

    + + + +
    abstract
    +

    Parameters

    +
    +

    $sql

    +string +
    +
    +

    $limit

    +int +
    +
    +

    $offset

    +int +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Return sql to list stored procedures

    +
    procedure_list() : string
    +
    +
    +

    +

    Returns

    +
    string
    +
    +
    +
    +

    Get the sql for random ordering

    +
    random() : string
    +
    +
    +

    + + + +
    abstract
    +

    Returns

    +
    string
    +
    +
    +
    +

    Return sql to list sequences

    +
    sequence_list() : string
    +
    +
    +

    +

    Returns

    +
    string
    +
    +
    +
    +

    Returns sql to list system tables

    +
    system_table_list() : string
    +
    +
    +

    +

    Returns

    +
    string
    +
    +
    +
    +

    Returns sql to list tables

    +
    table_list() : string
    +
    +
    +

    +

    Returns

    +
    string
    +
    +
    +
    +

    Returns sql to list triggers

    +
    trigger_list() : string
    +
    +
    +

    +

    Returns

    +
    string
    +
    +
    +
    +

    Return sql to list database field types

    +
    type_list() : mixed
    +
    +
    +

    +

    Returns

    +
    mixed
    +
    +
    +
    +

    Returns sql to list views

    +
    view_list() : string
    +
    +
    +

    +

    Returns

    +
    string
    +
    +
    +
    +
    +
    +
    +
    +
    + + diff --git a/docs/classes/iDB_Util.html b/docs/classes/iDB_Util.html new file mode 100644 index 0000000..7e9f147 --- /dev/null +++ b/docs/classes/iDB_Util.html @@ -0,0 +1,172 @@ + + + + + +Query » \iDB_Util + + + + + + + + + + +
    + +
    + +
    +
    +

    Interface defining database / table creation methods

    +
    +

    + + + + + + + + + +
    packageQuery
    subpackageQuery
    +

    + Methods

    +
    +

    Return an SQL file with the database data as insert statements

    +
    backup_data() : string
    +
    +
    +

    + + + +
    abstract
    +

    Returns

    +
    string
    +
    +
    +
    +

    Return an SQL file with the database table structure

    +
    backup_structure() : string
    +
    +
    +

    + + + +
    abstract
    +

    Returns

    +
    string
    +
    +
    +
    +

    Get database-specific sql to create a new table

    +
    create_table(string $name, array $columns, array $constraints, array $indexes) : string
    +
    +
    +

    + + + +
    abstract
    +

    Parameters

    +
    +

    $name

    +string +
    +
    +

    $columns

    +array +
    +
    +

    $constraints

    +array +
    +
    +

    $indexes

    +array +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Get database-specific sql to drop a table

    +
    delete_table(string $name) : string
    +
    +
    +

    + + + +
    abstract
    +

    Parameters

    +
    +

    $name

    +string +
    +

    Returns

    +
    string
    +
    +
    +
    +
    +
    +
    +
    +
    + + diff --git a/docs/classes/iPDO.html b/docs/classes/iPDO.html new file mode 100644 index 0000000..f507cd2 --- /dev/null +++ b/docs/classes/iPDO.html @@ -0,0 +1,85 @@ + + + + + +Query » \iPDO + + + + + + + + + + +
    + +
    +
    +
    + +
    + +
    +
    +
    +

    Another interface, just for more fun

    +
    +

    + + + + + + + + + +
    packageQuery
    subpackageQuery
    +
    +
    +
    +
    +
    +
    + + diff --git a/docs/classes/iQuery_Builder.html b/docs/classes/iQuery_Builder.html new file mode 100644 index 0000000..7355be2 --- /dev/null +++ b/docs/classes/iQuery_Builder.html @@ -0,0 +1,970 @@ + + + + + +Query » \iQuery_Builder + + + + + + + + + + +
    + +
    +
    +
    + +
    + +
    +
    +
    +

    Interface defining the Query Builder class

    +
    +

    + + + + + + + + + +
    packageQuery
    subpackageQuery
    +

    + Methods

    +
    +

    Retreive the number of rows in the selected table

    +
    count_all(string $table) : int
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +string +
    +

    Returns

    +
    int
    +
    +
    +
    +

    Retrieve the number of results for the generated query - used +in place of the get() method

    +
    count_all_results(string $table) : int
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +string +
    +

    Returns

    +
    int
    +
    +
    +
    +

    Deletes data from a table

    +
    delete(string $table, mixed $where) : mixed
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +string +
    +
    +

    $where

    +mixed +
    +

    Returns

    +
    mixed
    +
    +
    +
    +

    Adds the 'distinct' keyword to a query

    +
    distinct() : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Returns

    + +
    +
    +
    +

    Specify the database table to select from

    +
    from(string $tblname) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $tblname

    +string +
    +

    Returns

    + +
    +
    +
    +

    Select and retrieve all records from the current table, and/or +execute current compiled query

    +
    get($table, int $limit, int $offset) : object
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    + +
    +
    +

    $limit

    +int +
    +
    +

    $offset

    +int +
    +

    Returns

    +
    object
    +
    +
    +
    +

    Returns the generated 'delete' sql query

    +
    get_compiled_delete(string $table, bool $reset) : string
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +string +
    +
    +

    $reset

    +bool +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Returns the generated 'insert' sql query

    +
    get_compiled_insert(string $table, bool $reset) : string
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +string +
    +
    +

    $reset

    +bool +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Returns the generated 'select' sql query

    +
    get_compiled_select(string $table, bool $reset) : string
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +string +
    +
    +

    $reset

    +bool +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Returns the generated 'update' sql query

    +
    get_compiled_update(string $table, bool $reset) : string
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +string +
    +
    +

    $reset

    +bool +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Convience method for get() with a where clause

    +
    get_where(string $table, array $where, int $limit, int $offset) : object
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +string +
    +
    +

    $where

    +array +
    +
    +

    $limit

    +int +
    +
    +

    $offset

    +int +
    +

    Returns

    +
    object
    +
    +
    +
    +

    Group the results by the selected field(s)

    +
    group_by(mixed $field) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $field

    +mixed +
    +

    Returns

    + +
    +
    +
    +

    Ends a query group

    +
    group_end() : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Returns

    + +
    +
    +
    +

    Adds a paren to the current query for query grouping

    +
    group_start() : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Returns

    + +
    +
    +
    +

    Generates a 'Having' clause

    +
    having(mixed $key, mixed $val) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $key

    +mixed +
    +
    +

    $val

    +mixed +
    +

    Returns

    + +
    +
    +
    +

    Creates an insert clause, and executes it

    +
    insert(string $table, mixed $data) : mixed
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +string +
    +
    +

    $data

    +mixed +
    +

    Returns

    +
    mixed
    +
    +
    +
    +

    Creates a join phrase in a compiled query

    +
    join(string $table, string $condition, string $type) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $table

    +string +
    +
    +

    $condition

    +string +
    +
    +

    $type

    +string +
    +

    Returns

    + +
    +
    + +
    +

    Set a limit on the current sql statement

    +
    limit(int $limit, int $offset) : string
    +
    +
    +

    +

    Parameters

    +
    +

    $limit

    +int +
    +
    +

    $offset

    +int +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Generates a NOT LIKE clause

    +
    not_like(string $field, mixed $val, string $pos) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $field

    +string +
    +
    +

    $val

    +mixed +
    +
    +

    $pos

    +string +
    +

    Returns

    + +
    +
    +
    +

    Adds a paren to the current query for query grouping, +prefixed with 'OR'

    +
    or_group_start() : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Returns

    + +
    +
    +
    +

    Generates a 'Having' clause prefixed with 'OR'

    +
    or_having(mixed $key, mixed $val) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $key

    +mixed +
    +
    +

    $val

    +mixed +
    +

    Returns

    + +
    +
    +
    +

    Generates an OR Like clause

    +
    or_like(string $field, mixed $val, string $pos) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $field

    +string +
    +
    +

    $val

    +mixed +
    +
    +

    $pos

    +string +
    +

    Returns

    + +
    +
    +
    +

    Adds a paren to the current query for query grouping, +prefixed with 'OR NOT'

    +
    or_not_group_start() : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Returns

    + +
    +
    +
    +

    Generates a OR NOT LIKE clause

    +
    or_not_like(string $field, mixed $val, string $pos) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $field

    +string +
    +
    +

    $val

    +mixed +
    +
    +

    $pos

    +string +
    +

    Returns

    + +
    +
    +
    +

    Where clause prefixed with "OR"

    +
    or_where(string $key, mixed $val) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $key

    +string +
    +
    +

    $val

    +mixed +
    +

    Returns

    + +
    +
    +
    +

    Where in statement prefixed with "or"

    +
    or_where_in(string $field, mixed $val) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $field

    +string +
    +
    +

    $val

    +mixed +
    +

    Returns

    + +
    +
    +
    +

    OR WHERE NOT IN (FOO) clause

    +
    or_where_not_in(string $field, mixed $val) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $field

    +string +
    +
    +

    $val

    +mixed +
    +

    Returns

    + +
    +
    +
    +

    Order the results by the selected field(s)

    +
    order_by(string $field, string $type) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $field

    +string +
    +
    +

    $type

    +string +
    +

    Returns

    + +
    +
    +
    +

    Clear out the class variables, so the next query can be run

    +
    reset_query() : void
    +
    +

    +
    +
    +

    Specifies rows to select in a query

    +
    select(string $fields) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $fields

    +string +
    +

    Returns

    + +
    +
    +
    +

    Selects the average value of a field from a query

    +
    select_avg(string $field, string $as) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $field

    +string +
    +
    +

    $as

    +string +
    +

    Returns

    + +
    +
    +
    +

    Selects the maximum value of a field from a query

    +
    select_max(string $field, string $as) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $field

    +string +
    +
    +

    $as

    +string +
    +

    Returns

    + +
    +
    +
    +

    Selects the minimum value of a field from a query

    +
    select_min(string $field, string $as) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $field

    +string +
    +
    +

    $as

    +string +
    +

    Returns

    + +
    +
    +
    +

    Selects the sum of a field from a query

    +
    select_sum(string $field, string $as) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $field

    +string +
    +
    +

    $as

    +string +
    +

    Returns

    + +
    +
    +
    +

    Sets values for inserts / updates / deletes

    +
    set(mixed $key, mixed $val) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $key

    +mixed +
    +
    +

    $val

    +mixed +
    +

    Returns

    + +
    +
    +
    +

    Creates an update clause, and executes it

    +
    update(string $table, mixed $data) : mixed
    +
    +
    +

    +

    Parameters

    +
    +

    $table

    +string +
    +
    +

    $data

    +mixed +
    +

    Returns

    +
    mixed
    +
    +
    +
    +

    Specify condition(s) in the where clause of a query +Note: this function works with key / value, or a +passed array with key / value pairs

    +
    where(mixed $key, mixed $val) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $key

    +mixed +
    +
    +

    $val

    +mixed +
    +

    Returns

    + +
    +
    +
    +

    Where clause with 'IN' statement

    +
    where_in(mixed $field, mixed $val) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $field

    +mixed +
    +
    +

    $val

    +mixed +
    +

    Returns

    + +
    +
    +
    +

    WHERE NOT IN (FOO) clause

    +
    where_not_in(string $field, mixed $val) : \iQuery_Builder
    +
    +
    +

    + + + +
    fluentThis method is part of a fluent interface and will return the same instance
    +

    Parameters

    +
    +

    $field

    +string +
    +
    +

    $val

    +mixed +
    +

    Returns

    + +
    +
    +
    +
    +
    +
    +
    +
    + + diff --git a/docs/deprecated.html b/docs/deprecated.html index e85fbec..edd5070 100644 --- a/docs/deprecated.html +++ b/docs/deprecated.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -68,7 +68,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/errors.html b/docs/errors.html index 7544970..f78322d 100644 --- a/docs/errors.html +++ b/docs/errors.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -68,7 +68,6 @@
  • Compilation Errors
  • -

    classes/db_pdo.php6 @@ -231,12 +230,14 @@
    +
    +

    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/graph_class.html b/docs/graph_class.html index 53f7905..550fe57 100644 --- a/docs/graph_class.html +++ b/docs/graph_class.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -65,7 +65,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/markers.html b/docs/markers.html index 2004e14..a8b6333 100644 --- a/docs/markers.html +++ b/docs/markers.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -54,8 +54,6 @@
    @@ -68,7 +66,7 @@
    The following markers were found:
    • todo  - 4 + 2
    @@ -90,40 +88,6 @@
    -

    -drivers/pgsql/pgsql_driver.php1 -

    -
    - - - - - - - - - - -
    TypeLineDescription
    todo51Implement
    -
    -
    -

    -drivers/mysql/mysql_driver.php1 -

    -
    - - - - - - - - - - -
    TypeLineDescription
    todo65Implement
    -
    -

    drivers/firebird/firebird_util.php1

    @@ -146,7 +110,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/namespaces/default.html b/docs/namespaces/default.html index 9adbc4b..55d4e8b 100644 --- a/docs/namespaces/default.html +++ b/docs/namespaces/default.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -150,6 +150,20 @@ with array_map and glob

    Classes and interfaces

    +
    +

    iDB_SQL +

    +

    parent for database manipulation subclasses

    +
    +« More » +
    +
    +

    iQuery_Builder +

    +

    Interface defining the Query Builder class

    +
    +« More » +

    BadConnectionException

    @@ -171,13 +185,6 @@ with array_map and glob
    « More »
    -
    -

    DB_SQL -

    -

    Abstract parent for database manipulation subclasses

    -
    -« More » -

    DB_Util

    @@ -333,7 +340,7 @@ instantiates the specific db driver

    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/packages/.html b/docs/packages/.html index 3713c01..3c9e6f4 100644 --- a/docs/packages/.html +++ b/docs/packages/.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -68,7 +68,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/packages/Default.html b/docs/packages/Default.html index bcada64..f8812a3 100644 --- a/docs/packages/Default.html +++ b/docs/packages/Default.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -95,7 +95,7 @@
    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/packages/Query.Drivers.html b/docs/packages/Query.Drivers.html index 8d2790e..c83eac8 100644 --- a/docs/packages/Query.Drivers.html +++ b/docs/packages/Query.Drivers.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -212,7 +212,7 @@ data-fetching methods

    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/packages/Query.Query.html b/docs/packages/Query.Query.html index 13ac96d..8a80a05 100644 --- a/docs/packages/Query.Query.html +++ b/docs/packages/Query.Query.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -62,9 +62,12 @@ Query +
  • iDB_SQL
  • +
  • iQuery_Builder
  • +
  • Query_Parser
  • -
  • DB_SQL
  • DB_PDO
  • Query_Builder
  • @@ -84,6 +87,20 @@ instantiates the specific db driver">Query_Builder

    Classes and interfaces

    +
    +

    iDB_SQL +

    +

    parent for database manipulation subclasses

    +
    +« More » +
    +
    +

    iQuery_Builder +

    +

    Interface defining the Query Builder class

    +
    +« More » +

    BadConnectionException

    @@ -105,13 +122,6 @@ instantiates the specific db driver">Query_Builder
    « More »
    -
    -

    DB_SQL -

    -

    Abstract parent for database manipulation subclasses

    -
    -« More » -

    DB_Util

    @@ -140,7 +150,7 @@ instantiates the specific db driver

    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/packages/Query.html b/docs/packages/Query.html index 72dd87b..a189c65 100644 --- a/docs/packages/Query.html +++ b/docs/packages/Query.html @@ -35,7 +35,7 @@ 23
  •  Markers 
    • todo  - 4 + 2
  •  Deprecated elements  0
  • @@ -298,6 +298,20 @@ data-fetching methods

    Classes and interfaces

    +
    +

    iDB_SQL +

    +

    parent for database manipulation subclasses

    +
    +« More » +
    +
    +

    iQuery_Builder +

    +

    Interface defining the Query Builder class

    +
    +« More » +

    BadConnectionException

    @@ -319,13 +333,6 @@ data-fetching methods

    « More »
    -
    -

    DB_SQL -

    -

    Abstract parent for database manipulation subclasses

    -
    -« More » -

    DB_Util

    @@ -355,7 +362,7 @@ instantiates the specific db driver

    + generated on 2012-12-18T16:17:00-05:00.
    diff --git a/docs/structure.xml b/docs/structure.xml index d04684f..7fb8138 100644 --- a/docs/structure.xml +++ b/docs/structure.xml @@ -98,194 +98,7 @@ - - - - Free Query Builder / Database Abstraction Layer

    ]]>
    - - - - - -
    - - DB_SQL - \DB_SQL - - - - - - - - - limit - function - - - - - - string - - - int - - - int - - - string - - - - $sql - - - - - $limit - - - - - $offset - - - - - - random - function - - - - - - string - - - - - db_list - function - - - - - string - - - - - table_list - function - - - - - string - - - - - system_table_list - function - - - - - string - - - - - view_list - function - - - - - string - - - - - trigger_list - function - - - - - string - - - - - function_list - function - - - - - FALSE - - - - - procedure_list - function - - - - - string - - - - - sequence_list - function - - - - - string - - - - - type_list - function - - - - - mixed - - - - - column_list - function - - - - - - string - - - - $table - - - - - -
    - + Free Query Builder / Database Abstraction Layer

    ]]>
    @@ -764,28 +577,9 @@ the connection/database]]> - - switch_db - function - - - - - string - - - void - - - - $name - - - -
    - + Free Query Builder / Database Abstraction Layer

    ]]>
    @@ -818,6 +612,7 @@ the connection/database]]> Query_Builder \Query_Builder + \iQuery_Builder @@ -825,51 +620,51 @@ instantiates the specific db driver]]> - + $select_string - + $from_string - + $set_string - + $order_string - + $group_string - + $set_array_keys - + $order_array - + $group_array - + $values - + $where_values - + $limit - + $offset @@ -877,11 +672,11 @@ instantiates the specific db driver]]> $sql - + $query_map - + $having_map @@ -936,7 +731,7 @@ instantiates the specific db driver]]> - + _select function @@ -1101,7 +896,7 @@ instantiates the specific db driver]]> - + _like function @@ -1292,7 +1087,7 @@ instantiates the specific db driver]]> - + _having function @@ -1381,7 +1176,7 @@ instantiates the specific db driver]]> - + _where function @@ -1408,7 +1203,7 @@ instantiates the specific db driver]]> - + _where_string function @@ -1443,7 +1238,7 @@ instantiates the specific db driver]]> - + _where_in function @@ -2082,7 +1877,7 @@ in place of the get() method]]> get_compiled_update function - + string @@ -2109,7 +1904,7 @@ in place of the get() method]]> get_compiled_delete function - + string @@ -2132,7 +1927,7 @@ in place of the get() method]]> - + _get_compile function @@ -2174,7 +1969,7 @@ in place of the get() method]]> - + _run function @@ -2236,7 +2031,7 @@ in place of the get() method]]> - + _compile function @@ -2265,7 +2060,1228 @@ in place of the get() method]]>
    - + + + + Free Query Builder / Database Abstraction Layer

    ]]>
    + + + + + +
    + + iDB_SQL + \iDB_SQL + + + + + + + + + limit + function + + + + + + string + + + int + + + int + + + string + + + + $sql + + + + + $limit + + + + + $offset + + + + + + random + function + + + + + + string + + + + + db_list + function + + + + + string + + + + + table_list + function + + + + + string + + + + + system_table_list + function + + + + + string + + + + + view_list + function + + + + + string + + + + + trigger_list + function + + + + + string + + + + + function_list + function + + + + + FALSE + + + + + procedure_list + function + + + + + string + + + + + sequence_list + function + + + + + string + + + + + type_list + function + + + + + mixed + + + + + column_list + function + + + + + + string + + + + $table + + + + + +
    + + + + Free Query Builder / Database Abstraction Layer

    ]]>
    + + + + + +
    + + iQuery_Builder + \iQuery_Builder + + + + + + + + + select + function + + + + + string + + + \$this + + + + $fields + + + + + + select_max + function + + + + + string + + + string + + + \$this + + + + $field + + + + + $as + + + + + + select_min + function + + + + + string + + + string + + + \$this + + + + $field + + + + + $as + + + + + + select_avg + function + + + + + string + + + string + + + \$this + + + + $field + + + + + $as + + + + + + select_sum + function + + + + + string + + + string + + + \$this + + + + $field + + + + + $as + + + + + + distinct + function + + + + + \$this + + + + + from + function + + + + + string + + + \$this + + + + $tblname + + + + + + like + function + + + + + string + + + mixed + + + string + + + \$this + + + + $field + + + + + $val + + + + + $pos + + + + + + or_like + function + + + + + string + + + mixed + + + string + + + \$this + + + + $field + + + + + $val + + + + + $pos + + + + + + not_like + function + + + + + string + + + mixed + + + string + + + \$this + + + + $field + + + + + $val + + + + + $pos + + + + + + or_not_like + function + + + + + string + + + mixed + + + string + + + \$this + + + + $field + + + + + $val + + + + + $pos + + + + + + having + function + + + + + mixed + + + mixed + + + \$this + + + + $key + + + + + $val + + + + + + or_having + function + + + + + mixed + + + mixed + + + \$this + + + + $key + + + + + $val + + + + + + where + function + + + + + mixed + + + mixed + + + \$this + + + + $key + + + + + $val + + + + + + or_where + function + + + + + string + + + mixed + + + \$this + + + + $key + + + + + $val + + + + + + where_in + function + + + + + mixed + + + mixed + + + \$this + + + + $field + + + + + $val + + + + + + or_where_in + function + + + + + string + + + mixed + + + \$this + + + + $field + + + + + $val + + + + + + where_not_in + function + + + + + string + + + mixed + + + \$this + + + + $field + + + + + $val + + + + + + or_where_not_in + function + + + + + string + + + mixed + + + \$this + + + + $field + + + + + $val + + + + + + set + function + + + + + mixed + + + mixed + + + \$this + + + + $key + + + + + $val + + + + + + join + function + + + + + string + + + string + + + string + + + \$this + + + + $table + + + + + $condition + + + + + $type + + + + + + group_by + function + + + + + mixed + + + \$this + + + + $field + + + + + + order_by + function + + + + + string + + + string + + + \$this + + + + $field + + + + + $type + + + + + + limit + function + + + + + int + + + int + + + string + + + + $limit + + + + + $offset + + + + + + group_start + function + + + + + \$this + + + + + or_group_start + function + + + + + \$this + + + + + or_not_group_start + function + + + + + \$this + + + + + group_end + function + + + + + \$this + + + + + get + function + + + + + + int + + + int + + + object + + + + $table + + + + + $limit + + + + + $offset + + + + + + get_where + function + + + + + string + + + array + + + int + + + int + + + object + + + + $table + + + + + $where + + + + + $limit + + + + + $offset + + + + + + count_all + function + + + + + string + + + int + + + + $table + + + + + + count_all_results + function + + + + + string + + + int + + + + $table + + + + + + insert + function + + + + + string + + + mixed + + + mixed + + + + $table + + + + + $data + + + + + + update + function + + + + + string + + + mixed + + + mixed + + + + $table + + + + + $data + + + + + + delete + function + + + + + string + + + mixed + + + mixed + + + + $table + + + + + $where + + + + + + get_compiled_select + function + + + + + string + + + bool + + + string + + + + $table + + + + + $reset + + + + + + get_compiled_insert + function + + + + + string + + + bool + + + string + + + + $table + + + + + $reset + + + + + + get_compiled_update + function + + + + + string + + + bool + + + string + + + + $table + + + + + $reset + + + + + + get_compiled_delete + function + + + + + string + + + bool + + + string + + + + $table + + + + + $reset + + + + + + reset_query + function + + + + + void + + + + +
    + Free Query Builder / Database Abstraction Layer

    ]]>
    @@ -2469,7 +3485,7 @@ in place of the get() method]]>
    - + Free Query Builder / Database Abstraction Layer

    ]]>
    @@ -2585,7 +3601,7 @@ with array_map and glob]]>
    - + Free Query Builder / Database Abstraction Layer

    ]]>
    @@ -2597,7 +3613,8 @@ with array_map and glob]]> PgSQL_SQL \PgSQL_SQL - \DB_SQL + + \iDB_SQL @@ -2906,7 +3923,7 @@ with array_map and glob]]>
    - + Free Query Builder / Database Abstraction Layer

    ]]>
    @@ -2916,9 +3933,6 @@ with array_map and glob]]>
    - - Implement - PgSQL \PgSQL @@ -2970,44 +3984,28 @@ with array_map and glob]]> - switch_db + truncate function - + - + string - $name - - - - - - truncate - function - - - - - string - - - $table - + get_schemas function - + - + array @@ -3139,7 +4137,7 @@ with array_map and glob]]>
    - + Free Query Builder / Database Abstraction Layer

    ]]>
    @@ -3152,7 +4150,8 @@ with array_map and glob]]> ODBC_SQL \ODBC_SQL - \DB_SQL + + \iDB_SQL @@ -3325,7 +4324,7 @@ with array_map and glob]]>
    - + Free Query Builder / Database Abstraction Layer

    ]]>
    @@ -3394,38 +4393,19 @@ with array_map and glob]]> - switch_db - function - - - - - string - - - bool - - - - $name - - - - - truncate function - + - + string - + void - + $table @@ -3566,7 +4546,7 @@ with array_map and glob]]>
    - + Free Query Builder / Database Abstraction Layer

    ]]>
    @@ -3576,9 +4556,6 @@ with array_map and glob]]>
    - - Implement - MySQL \MySQL @@ -3641,32 +4618,16 @@ with array_map and glob]]> - switch_db + truncate function - + - + string - $name - - - - - - truncate - function - - - - - string - - - $table @@ -3674,7 +4635,7 @@ with array_map and glob]]>
    - + Free Query Builder / Database Abstraction Layer

    ]]>
    @@ -3687,7 +4648,8 @@ with array_map and glob]]> MySQL_SQL \MySQL_SQL - \DB_SQL + + \iDB_SQL @@ -4001,7 +4963,7 @@ with array_map and glob]]>
    - + Free Query Builder / Database Abstraction Layer

    ]]>
    @@ -4065,94 +5027,78 @@ with array_map and glob]]> - switch_db + truncate function - + - + string - $name - - - - - - truncate - function - - - - - string - - - $table - + get_tables function - + - + mixed - + get_system_tables function - + - + array - + load_database function - + - + string - + string - + $db - + $name - + unload_database function - + - + string - + $name @@ -4160,7 +5106,7 @@ with array_map and glob]]>
    - + Free Query Builder / Database Abstraction Layer

    ]]>
    @@ -4173,7 +5119,8 @@ with array_map and glob]]> SQLite_SQL \SQLite_SQL - \DB_SQL + + \iDB_SQL @@ -4346,7 +5293,7 @@ with array_map and glob]]>
    - + Free Query Builder / Database Abstraction Layer

    ]]>
    @@ -4359,7 +5306,8 @@ with array_map and glob]]> Firebird_SQL \Firebird_SQL - \DB_SQL + + \iDB_SQL @@ -4908,7 +5856,7 @@ the query]]>
    - + Free Query Builder / Database Abstraction Layer

    ]]>
    @@ -5005,218 +5953,199 @@ the last query executed]]> - - switch_db - function - - - - - string - - - FALSE - - - - $name - - - - - + truncate function - + - + string - + $table - + query function - + - + string - + \$this - + $sql - + prepare function - + - + string - + array - + \$this - + $query - + $options - + beginTransaction function - + - + bool - + commit function - + - + bool - + rollBack function - + - + bool - + prepare_execute function - + - + string - + array - + resource - + $sql - + $args - + quote function - + quote]]> - + string - + int - + string - + $str - + $param_type - + errorInfo function - + errorInfo / PDOStatement->errorInfo]]> - + array - + errorCode function - + errorCode]]> - + array - + prepare_query function - + - + string - + array - + FALSE - + $sql - + $params @@ -5375,7 +6304,7 @@ the last query executed]]> - todo + todo fixme diff --git a/drivers/firebird/firebird_driver.php b/drivers/firebird/firebird_driver.php index 33a8701..6a5fe26 100644 --- a/drivers/firebird/firebird_driver.php +++ b/drivers/firebird/firebird_driver.php @@ -86,19 +86,6 @@ class Firebird extends DB_PDO { // -------------------------------------------------------------------------- - /** - * Doesn't apply to Firebird - * - * @param string $name - * @return FALSE - */ - public function switch_db($name) - { - return FALSE; - } - - // -------------------------------------------------------------------------- - /** * Empty a database table * diff --git a/drivers/firebird/firebird_sql.php b/drivers/firebird/firebird_sql.php index 5535884..00d3dcc 100644 --- a/drivers/firebird/firebird_sql.php +++ b/drivers/firebird/firebird_sql.php @@ -19,7 +19,7 @@ * @package Query * @subpackage Drivers */ -class Firebird_SQL extends DB_SQL { +class Firebird_SQL implements iDB_SQL { /** * Limit clause diff --git a/drivers/mysql/mysql_driver.php b/drivers/mysql/mysql_driver.php index 630eac9..e1742ba 100644 --- a/drivers/mysql/mysql_driver.php +++ b/drivers/mysql/mysql_driver.php @@ -55,19 +55,6 @@ class MySQL extends DB_PDO { // -------------------------------------------------------------------------- - /** - * Connect to a different database - * - * @param string $name - */ - public function switch_db($name) - { - // TODO Implement - return FALSE; - } - - // -------------------------------------------------------------------------- - /** * Empty a table * diff --git a/drivers/mysql/mysql_sql.php b/drivers/mysql/mysql_sql.php index db60c1b..df48649 100644 --- a/drivers/mysql/mysql_sql.php +++ b/drivers/mysql/mysql_sql.php @@ -19,7 +19,7 @@ * @package Query * @subpackage Drivers */ -class MySQL_SQL extends DB_SQL { +class MySQL_SQL implements iDB_SQL { /** * Limit clause diff --git a/drivers/odbc/odbc_driver.php b/drivers/odbc/odbc_driver.php index 8a6eabf..8254e86 100644 --- a/drivers/odbc/odbc_driver.php +++ b/drivers/odbc/odbc_driver.php @@ -43,19 +43,6 @@ class ODBC extends DB_PDO { // -------------------------------------------------------------------------- - /** - * Doesn't apply to ODBC - * - * @param string $name - * @return bool - */ - public function switch_db($name) - { - return FALSE; - } - - // -------------------------------------------------------------------------- - /** * Empty the current database * diff --git a/drivers/odbc/odbc_sql.php b/drivers/odbc/odbc_sql.php index 09fa01f..f7432fb 100644 --- a/drivers/odbc/odbc_sql.php +++ b/drivers/odbc/odbc_sql.php @@ -19,7 +19,7 @@ * @package Query * @subpackage Drivers */ -class ODBC_SQL extends DB_SQL { +class ODBC_SQL implements iDB_SQL { /** * Limit clause diff --git a/drivers/pgsql/pgsql_driver.php b/drivers/pgsql/pgsql_driver.php index 1caa7d5..aee7dd6 100644 --- a/drivers/pgsql/pgsql_driver.php +++ b/drivers/pgsql/pgsql_driver.php @@ -41,19 +41,6 @@ class PgSQL extends DB_PDO { // -------------------------------------------------------------------------- - /** - * Connect to a different database - * - * @param string $name - */ - public function switch_db($name) - { - // TODO Implement - return FALSE; - } - - // -------------------------------------------------------------------------- - /** * Empty a table * diff --git a/drivers/pgsql/pgsql_sql.php b/drivers/pgsql/pgsql_sql.php index 2293dcb..b19213b 100644 --- a/drivers/pgsql/pgsql_sql.php +++ b/drivers/pgsql/pgsql_sql.php @@ -18,7 +18,7 @@ * @package Query * @subpackage Drivers */ -class PgSQL_SQL extends DB_SQL { +class PgSQL_SQL implements iDB_SQL { /** * Limit clause diff --git a/drivers/sqlite/sqlite_driver.php b/drivers/sqlite/sqlite_driver.php index 213d6dd..20690b6 100644 --- a/drivers/sqlite/sqlite_driver.php +++ b/drivers/sqlite/sqlite_driver.php @@ -43,18 +43,6 @@ class SQLite extends DB_PDO { // -------------------------------------------------------------------------- - /** - * Doesn't apply to sqlite - * - * @param string $name - */ - public function switch_db($name) - { - return FALSE; - } - - // -------------------------------------------------------------------------- - /** * Empty a table * diff --git a/drivers/sqlite/sqlite_sql.php b/drivers/sqlite/sqlite_sql.php index 5c1d8da..aa512d6 100644 --- a/drivers/sqlite/sqlite_sql.php +++ b/drivers/sqlite/sqlite_sql.php @@ -19,7 +19,7 @@ * @package Query * @subpackage Drivers */ -class SQLite_SQL extends DB_SQL { +class SQLite_SQL implements iDB_SQL { /** * Limit clause diff --git a/tests/db_files/FB_TEST_DB.FDB b/tests/db_files/FB_TEST_DB.FDB index bda2b3a..c89f950 100644 Binary files a/tests/db_files/FB_TEST_DB.FDB and b/tests/db_files/FB_TEST_DB.FDB differ