diff --git a/classes/db_pdo.php b/classes/db_pdo.php
index d3c20c1..4df2ee9 100644
--- a/classes/db_pdo.php
+++ b/classes/db_pdo.php
@@ -275,22 +275,6 @@ abstract class DB_PDO extends PDO {
// -------------------------------------------------------------------------
- /**
- * Deletes all the rows from a table. Does the same as the truncate
- * method if the database does not support 'TRUNCATE';
- *
- * @param string $table
- * @return mixed
- */
- public function empty_table($table)
- {
- $sql = 'DELETE FROM '.$this->quote_ident($table);
-
- return $this->query($sql);
- }
-
- // -------------------------------------------------------------------------
-
/**
* Return schemas for databases that list them
*
diff --git a/classes/query_builder.php b/classes/query_builder.php
index f9d9e0d..0b9f6f4 100644
--- a/classes/query_builder.php
+++ b/classes/query_builder.php
@@ -166,7 +166,7 @@ class Query_Builder implements iQuery_Builder {
}
}
- $this->select_string .= implode(',', $safe_array);
+ $this->select_string .= implode(', ', $safe_array);
unset($safe_array);
@@ -296,7 +296,7 @@ class Query_Builder implements iQuery_Builder {
public function from($tblname)
{
// Split identifiers on spaces
- $ident_array = explode(' ', trim($tblname));
+ $ident_array = explode(' ', mb_trim($tblname));
$ident_array = array_map('mb_trim', $ident_array);
// Quote the identifiers
@@ -547,7 +547,7 @@ class Query_Builder implements iQuery_Builder {
// Determine the correct conjunction
if (empty($this->query_map))
{
- $conj = ' WHERE ';
+ $conj = "\nWHERE ";
}
elseif ($first_item['type'] === 'group_start')
{
@@ -765,7 +765,7 @@ class Query_Builder implements iQuery_Builder {
$this->query_map[] = array(
'type' => 'join',
- 'conjunction' => strtoupper($type).' JOIN ',
+ 'conjunction' => "\n" . strtoupper($type) . ' JOIN ',
'string' => $condition,
);
@@ -828,8 +828,8 @@ class Query_Builder implements iQuery_Builder {
// Set the final string
$this->order_string = (empty($rand))
- ? ' ORDER BY '.implode(',', $order_clauses)
- : ' ORDER BY'.$rand;
+ ? "\nORDER BY ".implode(', ', $order_clauses)
+ : "\nORDER BY".$rand;
return $this;
}
@@ -1218,10 +1218,7 @@ class Query_Builder implements iQuery_Builder {
$skip = array('db','sql','queries','table_prefix','parser','conn_name');
// Skip properties that are needed for every query
- if (in_array($name, $skip))
- {
- continue;
- }
+ if (in_array($name, $skip)) continue;
// Nothing query-generation related is safe!
$this->$name = NULL;
@@ -1271,7 +1268,7 @@ class Query_Builder implements iQuery_Builder {
$total_time = number_format($end_time - $start_time, 5);
// Add the interpreted query to the list of executed queries
- $esql = str_replace('?', '%s', $sql);
+ $esql = str_replace('?', "%s", $sql);
array_unshift($vals, $esql);
$this->queries[] = array(
@@ -1329,7 +1326,7 @@ class Query_Builder implements iQuery_Builder {
{
default:
case "get":
- $sql = "SELECT * FROM {$this->from_string}";
+ $sql = "SELECT * \nFROM {$this->from_string}";
// Set the select string
if ( ! empty($this->select_string))
diff --git a/docs/classes.svg b/docs/classes.svg
index 9ede3fc..93c9ed5 100644
--- a/docs/classes.svg
+++ b/docs/classes.svg
@@ -22,245 +22,245 @@
\\DB_PDO
-
-«abstract»
-DB_PDO
+
+«abstract»
+DB_PDO
\\PDO
-
-\PDO
+
+\PDO
\\DB_PDO->\\PDO
-
-
-
-
-\\Firebird_Result
-
-Firebird_Result
-
-
-\\PDOStatement
-
-\PDOStatement
-
-
-\\Firebird_Result->\\PDOStatement
-
-
-
-
-\\Firebird_Util
-
-Firebird_Util
+
+
-\\DB_Util
-
-«abstract»
-DB_Util
+\\DB_Util
+
+«abstract»
+DB_Util
-
-\\Firebird_Util->\\DB_Util
-
-
+
+\\Query_Parser
+
+Query_Parser
\\Query_Builder
-
-Query_Builder
+
+Query_Builder
-\\iQuery_Builder
-
-iQuery_Builder
+\\iQuery_Builder
+
+iQuery_Builder
-\\Query_Builder->\\iQuery_Builder
-
-
-
-
-\\Firebird
-
-Firebird
-
-
-\\Firebird->\\DB_PDO
-
-
-
-
-\\MySQL_Util
-
-MySQL_Util
-
-
-\\MySQL_Util->\\DB_Util
-
-
+\\Query_Builder->\\iQuery_Builder
+
+
-\\ODBC_SQL
-
-ODBC_SQL
+\\ODBC_SQL
+
+ODBC_SQL
-\\iDB_SQL
-
-iDB_SQL
+\\iDB_SQL
+
+iDB_SQL
-\\ODBC_SQL->\\iDB_SQL
-
-
+\\ODBC_SQL->\\iDB_SQL
+
+
+
+
+\\ODBC
+
+ODBC
+
+
+\\ODBC->\\DB_PDO
+
+
-\\ODBC_Util
-
-ODBC_Util
+\\ODBC_Util
+
+ODBC_Util
-\\ODBC_Util->\\DB_Util
-
-
+\\ODBC_Util->\\DB_Util
+
+
+
+
+\\SQLite_SQL
+
+SQLite_SQL
+
+
+\\SQLite_SQL->\\iDB_SQL
+
+
-\\SQLite_Util
-
-SQLite_Util
+\\SQLite_Util
+
+SQLite_Util
-\\SQLite_Util->\\DB_Util
-
-
+\\SQLite_Util->\\DB_Util
+
+
-
-\\PgSQL_Util
-
-PgSQL_Util
+
+\\SQLite
+
+SQLite
-
-\\PgSQL_Util->\\DB_Util
-
-
+
+\\SQLite->\\DB_PDO
+
+
-
-\\PgSQL_SQL
-
-PgSQL_SQL
+
+\\Firebird_Util
+
+Firebird_Util
-
-\\PgSQL_SQL->\\iDB_SQL
-
-
-
-
-\\MySQL_SQL
-
-MySQL_SQL
-
-
-\\MySQL_SQL->\\iDB_SQL
-
-
+
+\\Firebird_Util->\\DB_Util
+
+
-\\Firebird_SQL
+\\Firebird_SQL
Firebird_SQL
-\\Firebird_SQL->\\iDB_SQL
-
-
+\\Firebird_SQL->\\iDB_SQL
+
+
-
-\\SQLite
-
-SQLite
+
+\\Firebird_Result
+
+Firebird_Result
-
-\\SQLite->\\DB_PDO
-
-
+
+\\PDOStatement
+
+\PDOStatement
-
-\\SQLite_SQL
-
-SQLite_SQL
+
+\\Firebird_Result->\\PDOStatement
+
+
-
-\\SQLite_SQL->\\iDB_SQL
-
-
+
+\\Firebird
+
+Firebird
-
-\\ODBC
-
-ODBC
-
-
-\\ODBC->\\DB_PDO
-
-
+
+\\Firebird->\\DB_PDO
+
+
-\\PgSQL
-
-PgSQL
+\\PgSQL
+
+PgSQL
-\\PgSQL->\\DB_PDO
-
-
+\\PgSQL->\\DB_PDO
+
+
+
+
+\\PgSQL_Util
+
+PgSQL_Util
+
+
+\\PgSQL_Util->\\DB_Util
+
+
+
+
+\\PgSQL_SQL
+
+PgSQL_SQL
+
+
+\\PgSQL_SQL->\\iDB_SQL
+
+
+
+
+\\MySQL
+
+MySQL
+
+
+\\MySQL->\\DB_PDO
+
+
+
+
+\\MySQL_Util
+
+MySQL_Util
+
+
+\\MySQL_Util->\\DB_Util
+
+
+
+
+\\MySQL_SQL
+
+MySQL_SQL
+
+
+\\MySQL_SQL->\\iDB_SQL
+
+
-\\BadDBDriverException
-
-BadDBDriverException
+\\BadDBDriverException
+
+BadDBDriverException
-\\InvalidArgumentException
+\\InvalidArgumentException
\InvalidArgumentException
-\\BadDBDriverException->\\InvalidArgumentException
-
-
+\\BadDBDriverException->\\InvalidArgumentException
+
+
-\\BadConnectionException
+\\BadConnectionException
BadConnectionException
-\\UnexpectedValueException
+\\UnexpectedValueException
\UnexpectedValueException
-\\BadConnectionException->\\UnexpectedValueException
+\\BadConnectionException->\\UnexpectedValueException
-
-\\Query_Parser
-
-Query_Parser
-
-
-\\MySQL
-
-MySQL
-
-
-\\MySQL->\\DB_PDO
-
-
-
diff --git a/docs/classes/BadConnectionException.html b/docs/classes/BadConnectionException.html
index 62453a4..948289b 100644
--- a/docs/classes/BadConnectionException.html
+++ b/docs/classes/BadConnectionException.html
@@ -85,7 +85,7 @@
Template is built using Twitter Bootstrap 2 and icons provided by Glyphicons.
Documentation is powered by phpDocumentor 2.1.0
and
- generated on 2014-02-07T16:51:34-05:00.
+ generated on 2014-02-12T19:09:30-05:00.