LazyRecord\BaseModel::lockWrite PHP Метод

lockWrite() публичный Метод

public lockWrite ( $alias = null )
    public function lockWrite($alias = null)
    {
        if (!$alias) {
            $alias = $this->alias;
        }
        // the ::table consts is in the child class.
        if ($alias) {
            $sql = 'LOCK TABLES ' . $this->table . ' AS ' . $alias . ' WRITE';
        } else {
            $sql = 'LOCK TABLES ' . $this->table . ' WRITE';
        }
        $this->getWriteConnection()->query($sql);
    }