Example #1
0
 /**
  * Create a new alter query builder.
  *
  * @param	string	The name of the table to alter.
  */
 public function __construct($table_name)
 {
     // Set the table name.
     $this->_original_name = $table_name;
     // Because mummy says so.
     parent::__construct(Database::ALTER, '');
 }
Example #2
0
 public function __construct(array $table)
 {
     // Set the table array
     $this->_table = $table;
     // Because mummy says so
     parent::__construct(Database::CREATE, '');
 }
Example #3
0
 public function __construct($table)
 {
     // Set the table object.
     $this->_table = $table;
     // Because mummy says so.
     parent::__construct(Database::TRUNCATE, '');
 }
Example #4
0
 public function __construct($table, array $columns, array $params)
 {
     $this->_table = $table;
     $this->_params = $params;
     $this->_columns = $columns;
     parent::__construct(Database_Query_Type::CREATE, '');
 }
Example #5
0
 public function __construct($type, $name)
 {
     // Set the type of the object we're about to drop.
     $this->_drop_type = $type;
     // Set the object we're going to drop.
     $this->_name = $name;
     // Because mummy says so.
     parent::__construct(Database::DROP, '');
 }
 public function __construct($table = NULL, array $columns = NULL)
 {
     if ($table) {
         $this->table($table);
     }
     if ($columns) {
         $this->_columns = $columns;
     }
     return parent::__construct(Database::INSERT, '');
 }
Example #7
0
 /**
  * Set the table and columns for an insert.
  *
  * @param   mixed  table name or array($table, $alias) or object
  * @param   array  column names
  * @return  void
  */
 public function __construct($table, array $columns = NULL)
 {
     // Set the inital table name
     $this->_table = $table;
     if (!empty($columns)) {
         // Set the column names
         $this->_columns = $columns;
     }
     // Start the query with no SQL
     return parent::__construct(Database::INSERT, '');
 }
Example #8
0
 /**
  * Set the table and columns for an insert.
  *
  * @param   mixed $table   table name or array($table, $alias) or object
  * @param   array $columns column names
  */
 public function __construct($table = null, array $columns = null)
 {
     if ($table) {
         // Set the inital table name
         $this->_table = $table;
     }
     if ($columns) {
         // Set the column names
         $this->_columns = $columns;
     }
     // Start the query with no SQL
     parent::__construct('', \DB::INSERT);
 }
Example #9
0
 /**
  * Set the table and columns for an insert.
  *
  * @param   mixed  table name or array($table, $alias) or object
  * @param   array  column names
  * @return  void
  */
 public function __construct($table = NULL, array $columns = NULL)
 {
     if ($table) {
         // Set the inital table name
         $this->_table = $table;
     }
     if ($columns) {
         // Set the column names
         $this->_columns = $columns;
     }
     // Start the query with no SQL
     return parent::__construct('', \Database::INSERT);
 }
Example #10
0
 public function __construct($type, $object)
 {
     $this->_drop_type = $type;
     $this->_object = $object;
     parent::__construct(Database_Query_Type::DROP, '');
 }