20        'datetime' => 
'TIMESTAMP',
 
   28        $this->pdo = 
new PDO(
'mysql:host=localhost;dbname=test_db;charset=utf8', 
'travis', 
'');
 
   29        $this->pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, 
true);
 
   30        $attr = PDO::MYSQL_ATTR_USE_BUFFERED_QUERY;
 
   42            $table_seq = $table_name . 
'_seq';
 
   43            $stmt = $this->pdo->prepare(
"SELECT * FROM $table_seq");
 
   65        $query = 
"CREATE TABLE $table_name ($fields_query);";
 
   78        foreach ($fields as 
$name => $field) {
 
   79            $type = $this->type_to_mysql_type[$field[
'type']];
 
   80            $length = $field[
'length'];
 
   81            $primary = isset($field[
'is_primary']) && $field[
'is_primary'] ? 
"PRIMARY KEY" : 
"";
 
   82            $notnull = isset($field[
'is_notnull']) && $field[
'is_notnull'] ? 
"NOT NULL" : 
"";
 
   83            $sequence = isset($field[
'sequence']) && $field[
'sequence'] ? 
"AUTO_INCREMENT" : 
"";
 
   84            $query .= 
"$name $type ($length) $sequence $primary $notnull,";
 
   87        return substr(
$query, 0, -1);
 
   97        $keys = implode($primary_keys);
 
   98        $this->pdo->exec(
"ALTER TABLE $table_name ADD PRIMARY KEY ($keys)");
 
  118        $result = $this->pdo->prepare(
"SHOW TABLES LIKE :table_name");
 
  119        $result->execute(array( 
':table_name' => $table_name ));
 
  135        $statement = $this->pdo->query(
"SHOW COLUMNS FROM $table_name WHERE Field = '$column_name'");
 
  136        $statement != 
null ? $statement->closeCursor() : 
"";
 
  138        return $statement != 
null && $statement->rowCount() != 0;
 
  151        $this->pdo->exec(
"ALTER TABLE $$table_name ADD $$col_str");
 
  160        $this->pdo->exec(
"DROP TABLE $table_name");
 
  172        $err = $this->pdo->errorInfo();
 
  185        return $query_result->fetchAll($query_result);
 
  194        $table_seq = $table_name . 
"_seq";
 
  196            $this->pdo->exec(
"DROP TABLE $table_seq");
 
  207        $this->pdo->exec(
"ALTER TABLE $$table_name DROP COLUMN $column_name");
 
  218        $this->pdo->exec(
"alter table $table_name change $column_old_name $column_new_name");
 
  230            $real[] = $this->
quote($val[1], $val[0]);
 
  233        $this->pdo->exec(
"INSERT INTO $table_name VALUES ($values)");
 
  244        $res = $query_result->fetchObject();
 
  246            $query_result->closeCursor();
 
  262        $query = 
"UPDATE $table_name SET ";
 
  264            $qval = $this->
quote($val[1], $val[0]);
 
  268        foreach ($where as 
$key => $val) {
 
  269            $qval = $this->
quote($val[1], $val[0]);
 
  293        $res = $query_result->fetch(PDO::FETCH_ASSOC);
 
  295            $query_result->closeCursor();
 
  311        return $query_result->rowCount();
 
  324        return $this->pdo->quote($value);
 
An exception for terminatinating execution or to throw for unit testing.
renameTableColumn($table_name, $column_old_name, $column_new_name)
addTableColumn($table_name, $column_name, $attributes)
createTable($table_name, $fields)
experimental....
addIndex($table_name, $index_name)
dropTableColumn($table_name, $column_name)
update($table_name, $values, $where)
dropSequence($table_name)
createTableFields($fields)
fetchObject($query_result)
createSequence($table_name)
addPrimaryKey($table_name, $primary_keys)
insert($table_name, $values)
tableColumnExists($table_name, $column_name)
fetchAssoc($query_result)
if(array_key_exists('yes', $_REQUEST)) $attributes
foreach($_POST as $key=> $value) $res