コード例 #1
0
ファイル: alter.php プロジェクト: ascseb/dbforge
 /**
  * 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, '');
 }
コード例 #2
0
ファイル: create.php プロジェクト: ascseb/dbforge
 public function __construct(array $table)
 {
     // Set the table array
     $this->_table = $table;
     // Because mummy says so
     parent::__construct(Database::CREATE, '');
 }
コード例 #3
0
ファイル: truncate.php プロジェクト: ascseb/dbforge
 public function __construct($table)
 {
     // Set the table object.
     $this->_table = $table;
     // Because mummy says so.
     parent::__construct(Database::TRUNCATE, '');
 }
コード例 #4
0
ファイル: create.php プロジェクト: joelpittet/database
 public function __construct($table, array $columns, array $params)
 {
     $this->_table = $table;
     $this->_params = $params;
     $this->_columns = $columns;
     parent::__construct(Database_Query_Type::CREATE, '');
 }
コード例 #5
0
ファイル: drop.php プロジェクト: ascseb/dbforge
 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, '');
 }
コード例 #6
0
 public function __construct($table = NULL, array $columns = NULL)
 {
     if ($table) {
         $this->table($table);
     }
     if ($columns) {
         $this->_columns = $columns;
     }
     return parent::__construct(Database::INSERT, '');
 }
コード例 #7
0
ファイル: insert.php プロジェクト: joelpittet/database
 /**
  * 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, '');
 }
コード例 #8
0
ファイル: insert.php プロジェクト: SainsburysTests/sainsburys
 /**
  * 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);
 }
コード例 #9
0
ファイル: insert.php プロジェクト: huglester/fuel-uploadify
 /**
  * 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);
 }
コード例 #10
0
ファイル: drop.php プロジェクト: joelpittet/database
 public function __construct($type, $object)
 {
     $this->_drop_type = $type;
     $this->_object = $object;
     parent::__construct(Database_Query_Type::DROP, '');
 }