Documentation

DatabaseAbstract

Table of Contents

evaluate() mixed
fieldExtract() fieldExtract. int|null
filter() filter. array
getFilteredColumn() array
buildQuery() string
buildCondition() string
executeQuery() array
processCondition() mixed

Methods

evaluate()

public abstract static evaluate( $database : mixed , $field : mixed , $criteria : mixed ) : mixed
Parameters
$database : mixed
$field : mixed
$criteria : mixed
Return values
mixed

fieldExtract()

fieldExtract.

protected static fieldExtract( $database : array , $field : mixed ) : int|null

Extracts the column ID to use for the data field.

Parameters
$database : array

The range of cells that makes up the list or database. A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.

$field : mixed

Indicates which column is used in the function. Enter the column label enclosed between double quotation marks, such as "Age" or "Yield," or a number (without quotation marks) that represents the position of the column within the list: 1 for the first column, 2 for the second column, and so on.

Return values
int|null

filter()

filter.

protected static filter( $database : array , $criteria : array ) : array

Parses the selection criteria, extracts the database rows that match those criteria, and returns that subset of rows.

Parameters
$database : array

The range of cells that makes up the list or database. A database is a list of related data in which rows of related information are records, and columns of data are fields. The first row of the list contains labels for each column.

$criteria : array

The range of cells that contains the conditions you specify. You can use any range for the criteria argument, as long as it includes at least one column label and at least one cell below the column label in which you specify a condition for the column.

Return values
array

of mixed

getFilteredColumn()

protected static getFilteredColumn( $database : array , $field : int|null , $criteria : array ) : array
Parameters
$database : array
$field : int|null
$criteria : array
Return values
array

buildQuery()

private static buildQuery( $criteriaNames : array , $criteria : array ) : string
Parameters
$criteriaNames : array
$criteria : array
Return values
string

buildCondition()

private static buildCondition( $criterion : mixed , $criterionName : string ) : string
Parameters
$criterion : mixed
$criterionName : string
Return values
string

executeQuery()

private static executeQuery( $database : array , $query : string , $criteria : array , $fields : array ) : array
Parameters
$database : array
$query : string
$criteria : array
$fields : array
Return values
array

processCondition()

private static processCondition( $criterion : string , $fields : array , $dataValues : array , $conditions : string ) : mixed
Parameters
$criterion : string
$fields : array
$dataValues : array
$conditions : string
Return values
mixed

Search results