lithium\data\source\database\adapter\Sqlite3::_execute()

protected method

Execute a given query.

Parameters

  • string $sql

    The sql string to execute

  • array $options

    No available options.

Returns

\lithium\data\source\Result

Returns a result object if the query was successful.

Filter

This method can be filtered.

Source

	protected function _execute($sql, array $options = []) {
		$params = compact('sql', 'options');

		return Filters::run($this, __FUNCTION__, $params, function($params) {
			try {
				$resource = $this->connection->query($params['sql']);
			} catch (PDOException $e) {
				$this->_error($params['sql']);
			};
			return $this->_instance('result', compact('resource'));
		});
	}