The interface that data source adapters must follow.

package Cactus
author Dave Widmer

 Methods

Runs a query that will remove data.

delete(string $query, array $params) : int

Parameters

$query

string

The query to run

$params

array

A list of parameters to bind to the query

Returns

intThe number of deleted rows

Gets a list of all of the queries that have been run.

getQueries() : array

Returns

array

Runs a query that will add data to the dataset

insert(string $query, array $params) : array

Parameters

$query

string

The query to run.

$params

array

A list of parameters to bind to the query

Returns

arrayarray($insert_id, $affected_rows);

Runs a raw query.

query(string $query) : boolean

Parameters

$query

string

The query

Returns

booleanSuccess

Runs a query to find data in the dataset.

select(string $query, array $params) : array

Parameters

$query

string

The query to run.

$params

array

A list of parameters to bind to the query

Returns

arrayThe result set from the query

Runs a query that will update data

update(string $query, array $params) : int

Parameters

$query

string

The query to run

$params

array

A list of parameters to bind to the query

Returns

intThe number of affected rows