コード例 #1
0
 public function replaceOrDelete()
 {
     if ($this->draft == '' && !array_filter($this->metadata)) {
         queryfx($this->establishConnection('w'), 'DELETE FROM %T WHERE authorPHID = %s AND draftKey = %s', $this->getTableName(), $this->authorPHID, $this->draftKey);
         return $this;
     }
     return parent::replace();
 }
コード例 #2
0
 protected function getConfiguration()
 {
     return array(self::CONFIG_SERIALIZATION => array('properties' => self::SERIALIZATION_JSON), self::CONFIG_COLUMN_SCHEMA => array('version' => 'uint32'), self::CONFIG_KEY_SCHEMA => array('key_object' => array('columns' => array('objectPHID', 'authorPHID', 'version'), 'unique' => true))) + parent::getConfiguration();
 }