Example #1
0
 /**
  * 删除一整行
  * @return \Cassandra\Response\Response
  */
 public function remove()
 {
     $query = Query::delete()->from(static::$_name);
     $conditions = [];
     $bind = [];
     foreach (static::$_primary as $key) {
         $conditions[] = $key . ' = ?';
         $bind[] = Type\Base::getTypeObject(static::$_columns[$key], $this[$key]);
     }
     $query->where(implode(' AND ', $conditions))->bind($bind)->setDbAdapter(static::$_dbAdapter)->setConsistency(static::$_writeConsistency);
     return $query->querySync();
 }