Ejemplo n.º 1
0
 protected function _prepareQuery(IStatement $stmt, QlDao $dao)
 {
     if (($stmt instanceof CqlInsertStatement || $stmt instanceof CqlUpdateStatement) && $dao instanceof CqlDao) {
         if ($dao->getTtl() !== null && $dao->getTtl() > 0) {
             $stmt->usingTtl($dao->getTtl());
         }
         if ($dao->getTimestamp() !== null && $dao->getTimestamp() > 0) {
             $stmt->usingTimestamp($dao->getTimestamp());
         }
     }
 }
Ejemplo n.º 2
0
 protected function _getDaoChanges(QlDao $dao, $includeIds = true)
 {
     $changes = $dao->getDaoChanges();
     foreach ($changes as $column => $value) {
         if (!$includeIds && in_array($column, $dao->getDaoIDProperties())) {
             unset($changes[$column]);
         } else {
             $changes[$column] = $value['to'];
         }
     }
     return $changes;
 }
Ejemplo n.º 3
0
 public function getDataStore()
 {
     if ($this->_dataStore === null) {
         return parent::getDataStore();
     }
     return $this->_dataStore;
 }