Fires a DB::clearCachedRecord a key static::$tableName.'/'.static::getPrimaryKey()

@return void
349065
public function clearCaches()
    {
        foreach ($this->getClassFields() as $field => $options) {
            if (!empty($options['unique']) || !empty($options['primary'])) {
                $key = sprintf('%s/%s', static::$tableName, $field);
                DB::clearCachedRecord($key);
            }
        }
    }
1346584
public function delete() 
	{
		$settings = static::_model();

		$result = DB::delete( $settings['table'] )
			->where( $settings['primary_key'], $this->_data_store[$settings['primary_key']] )
			->limit(1)
			->run( $settings['handler'] );

		$this->_data_store[$cache['primary_key']] = null;

		return $result;
	}
649070
public function clear()
    {
        $this->models = [];
        $this->modelKeyMap = [];
        $this->added = [];
        $this->removed = $this->original;
        return $this;
    }
175005
public function unlockMyRecords($tableName)
    {
        $results = $this->lockedRecordsByUser($tableName, Auth::user()->id);

        foreach($results as $result)
        {
            $this->unpopulateLockFields($result->id);
        }
    }
1243778
public function ClearCache()
    {
        $query = "DELETE FROM `shop_search_cache_item` WHERE `shop_search_cache_id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."' ";
        MySqlLegacySupport::getInstance()->query($query);
        $query = "DELETE FROM `shop_search_cache` WHERE `id` = '".MySqlLegacySupport::getInstance()->real_escape_string($this->id)."'";
        MySqlLegacySupport::getInstance()->query($query);
        $this->id = null;
        $this->sqlData['id'] = null;
    }
1296672
public function primaryKey($key = null)
    {
        if ($key !== null) {
            $this->setPrimaryKey($key);
        }

        return $this->getPrimaryKey();
    }
845447
public function getPrimaryKey(): ?Index {
		// if the table is not persistent so far, it is possible that it doesn't have a Primary Key
		$primaryKey = null;
		foreach ($this->getIndexes() as $index) {
			if ($index->getType() == IndexType::PRIMARY) {
				if (null === $this->primaryKey) {
					$primaryKey = $index;
				} else {
					throw new MetaRuntimeException('Duplicate primary key in table "' . $this->getName() . '"');
				}
			}
		}
		
		return $primaryKey;
	}
1362451
public function flushCache()
    {
        $database = $this->getDatabase();
        
        $tables = static::getTables($database);
        
        $key  = 'db/tables/' . $database;
        static::getCache()->remove($key);
        
        if ($tables) {
            foreach ($tables as $table) {
                $key  = 'db/tableinfo/' . $table;
                static::getCache()->remove($key);
            }
        }
    }
356804
public function getPrimarykey($table=null) 
    {
        if ($table) {
            return $this->getDb()->getPrimaryKey($table);
        } else {
            if (!isset($this->options['primary_key'])) {
                $pk = $this->getDb()->getPrimaryKey($this->getTableName());
                $this->options['primary_key'] = $pk;
            }
            
            return $this->options['primary_key'];
        }
    }
1086862
protected function findPrimaryKeys($table)
	{
		$pks=$this->getDbConnection()->getPdoInstance()->cubrid_schema(PDO::CUBRID_SCH_PRIMARY_KEY,$table->name);

		foreach($pks as $pk)
		{
			$c = $table->columns[$pk['ATTR_NAME']];
			$c->isPrimaryKey = true;

			if($table->primaryKey===null)
				$table->primaryKey=$c->name;
			elseif(is_string($table->primaryKey))
				$table->primaryKey=array($table->primaryKey,$c->name);
			else
				$table->primaryKey[]=$c->name;
			if($c->autoIncrement)
				$table->sequenceName='';
		}
	}
1137168
public function deleteKey($keyname) {

        $key = $this->getKey($keyname);
        if ($key) {
            $i = $this->findKeyInArray($keyname);
            // Look for prev and next key
            $prevkey = $this->getKey($key->getPrevious());
            $nextkey = $this->getKey($key->getNext());
            // Change their previous and next attributes
            if ($prevkey) {
                $prevkey->setNext($key->getNext());
            }
            if ($nextkey) {
                $nextkey->setPrevious($key->getPrevious());
            }
            // Delete the key
            unset($this->keys[$i]);
            // Reorder the Keys
            $this->orderKeys($this->keys);
            // Recalculate the hash
            $this->calculateHash(true);
            // We have one deleted key, so the table has changed
            $this->setChanged(true);
        }
    }
130471
public function setPrimaryKey(PrimaryKey $primaryKey)
    {
        foreach ($primaryKey->getColumnNames() as $columnName) {
            $this->getColumn($columnName)->setNotNull(true);
        }

        $this->primaryKey = $primaryKey;
    }
764493
public function delete()
    {
        if (is_null($this->primaryKey) ||  is_null($this->getKey())) {
            throw new RuntimeException("No primary key defined on model.");
        }

        if ($this->exists) {
            if ($this->fireModelEvent('deleting') === false) {
                return false;
            }

            if (! $this->performDeleteOnModel()) {
                return false;
            }

            $this->exists = false;

            // Once the model has been deleted, we will fire off the deleted event so that
            // the developers may hook into post-delete operations. We will then return
            // a boolean true which indicated the success of the delete operation on the API.
            $this->fireModelEvent('deleted', true);

            return true;
        }
    }
1366312
public function clear()
    {
        parent::clear();

        $this->with = array();
        $this->primaryCriteria = null;
        $this->formatter = null;
        $this->select = null;
        $this->modelAlias = $this->originalModelAlias;
        $this->currentAlias = null;
        $this->setDbName($this->originalDbName);
        $this->useAliasInSQL = false;
        $this->isKeepQuery = true;
        $this->previousJoin = null;
        $this->isWithOneToMany = false;
        $this->replacedColumns = array();
        $this->foundMatch = false;

        return $this;
    }
144630
public function delete()
	{
		$this->verifyNotReadonly('delete');

		$pk = $this->valuesForPk();

		if (empty($pk))
			throw new ActiveRecordException("Cannot delete, no primary key defined for: " . get_called_class());

		if (!$this->invokeCallback('beforeDestroy',false))
			return false;

		static::table()->delete($pk);
		$this->invokeCallback('afterDestroy',false);

		return true;
	}
689552
public function getPrimaryKey()
    {
        if ($this->_primaryKey === null) {
            $key = (array)$this->getSchema()->primaryKey();
            if (count($key) === 1) {
                $key = $key[0];
            }
            $this->_primaryKey = $key;
        }

        return $this->_primaryKey;
    }
691642
public function deleteByPK(array $primary_key)
    {
        $where = $this
            ->checkPrimaryKey($primary_key)
            ->getWhereFrom($primary_key)
        ;

        return $this->deleteWhere($where)->current();
    }