public function compile() { list($sql, $bind) = parent::compile(); if ($this->for_update !== null) { $sql .= ' FOR UPDATE'; if ($this->for_update) { $sql .= ' NOTWAIT'; } } elseif ($this->for_share !== null) { $sql .= ' FOR SHARE'; if ($this->for_share) { $sql .= ' NOTWAIT'; } } return array($sql, $bind); }