Constants

GREATER

GREATER

GREATER_OR_EQUAL

GREATER_OR_EQUAL

LESS

LESS

LESS_OR_EQUAL

LESS_OR_EQUAL

NOT_EQUAL

NOT_EQUAL

NOT

NOT

_AND

_AND

_OR

_OR

LIKE

LIKE

LPAREN

LPAREN

RPAREN

RPAREN

EQUAL

EQUAL

ESCAPE_DOT

ESCAPE_DOT

ESCAPE_LIKE_WILDCARD_ONE

ESCAPE_LIKE_WILDCARD_ONE

ESCAPE_LIKE_WILDCARD_MULTIPLE

ESCAPE_LIKE_WILDCARD_MULTIPLE

LIKE_WILDCARD_ONE

LIKE_WILDCARD_ONE

LIKE_WILDCARD_MULTIPLE

LIKE_WILDCARD_MULTIPLE

Properties

$queryString

$queryString : string

Query string currently being created.

Type

string

Methods

__construct()

__construct() 

Construct an instance.

Examples

Example of creating a Buildquery
use \InterExperts\TinyQ\Builder;

$builder = new Builder();

$builder->not()
        ->equal('name', 'henry.aaron')
        ->or()
        ->lparen()
        ->greaterOrEqual('age', 18)
        ->and()
        ->LessOrEqual('age', 65)
        ->rparen();
echo $builder->build(); // .tname.ehenry..aaron.o.sage.h18.aage.m65.f

greater()

greater(string  $key, mixed  $value) : \InterExperts\TinyQ\Builder

Add the TinyQ equivalent of the ">" operator to the expression.

Parameters

string $key

Property to search

mixed $value

Searchterm

Returns

\InterExperts\TinyQ\Builder

greaterOrEqual()

greaterOrEqual(string  $key, mixed  $value) : \InterExperts\TinyQ\Builder

Add the TinyQ equivalent of the "<=" operator to the expression.

Parameters

string $key

Property to search

mixed $value

Searchterm

Returns

\InterExperts\TinyQ\Builder

less()

less(string  $key, mixed  $value) : \InterExperts\TinyQ\Builder

Add the TinyQ equivalent of the "<" operator to the expression.

Parameters

string $key

Property to search

mixed $value

Searchterm

Returns

\InterExperts\TinyQ\Builder

lessOrEqual()

lessOrEqual(string  $key, mixed  $value) : \InterExperts\TinyQ\Builder

Add the TinyQ equivalent of the "<=" operator to the expression.

Parameters

string $key

Property to search

mixed $value

Searchterm

Returns

\InterExperts\TinyQ\Builder

notEqual()

notEqual(string  $key, mixed  $value) : \InterExperts\TinyQ\Builder

Add the TinyQ equivalent of the "!=" operator to the expression.

Parameters

string $key

Property to search

mixed $value

Searchterm

Returns

\InterExperts\TinyQ\Builder

not()

not() : \InterExperts\TinyQ\Builder

Add the TinyQ equivalent of the "NOT" operator to the expression.

Returns

\InterExperts\TinyQ\Builder

like()

like(string  $key, mixed  $value) : \InterExperts\TinyQ\Builder

Add the TinyQ equivalent of the "LIKE" operator to the expression.

Parameters

string $key

Property to search

mixed $value

Searchterm

Returns

\InterExperts\TinyQ\Builder

lparen()

lparen() : \InterExperts\TinyQ\Builder

Append the equivalent of a left parenthesis (the left grouping operator);

Returns

\InterExperts\TinyQ\Builder

rparen()

rparen() : \InterExperts\TinyQ\Builder

Append the equivalent of a right parenthesis (the right grouping operator);

Returns

\InterExperts\TinyQ\Builder

equal()

equal(string  $key, mixed  $value) : \InterExperts\TinyQ\Builder

Add the TinyQ equivalent of the "==" operator to the expression.

Parameters

string $key

Property to search

mixed $value

Searchterm

Returns

\InterExperts\TinyQ\Builder

reset()

reset() : \InterExperts\TinyQ\Builder

Reset the instance so another expression can be built.

Returns

\InterExperts\TinyQ\Builder

build()

build() : string

Return the TinyQ language expression.

Returns

string

escapeLike()

escapeLike(string  $string) : string

Escape queries to be used in LIKE statements.

Parameters

string $string

String to be escaped

Returns

string

and()

and() : \InterExperts\TinyQ\Builder

Add the TinyQ equivalent of the "AND" operator to the expression.

Returns

\InterExperts\TinyQ\Builder

or()

or() : \InterExperts\TinyQ\Builder

Add the TinyQ equivalent of the "OR" operator to the expression.

Returns

\InterExperts\TinyQ\Builder

createEscapedString()

createEscapedString(string  $key, mixed  $value, string  $operator) : string

Escape key and value query parts.

Parameters

string $key

Property to search

mixed $value

Searchterm

string $operator

TinyQ operator

Returns

string

_and()

_and() : \InterExperts\TinyQ\Builder

Add the TinyQ equivalent of the "AND" operator to the expression. Method for reserved `and` keyword.

Returns

\InterExperts\TinyQ\Builder

_or()

_or() : \InterExperts\TinyQ\Builder

Add the TinyQ equivalent of the "OR" operator to the expression. Method for reserved `or` keyword.

Returns

\InterExperts\TinyQ\Builder

escape()

escape(string  $string) : string

Escape the query paramaters.

Parameters

string $string

String to be escaped

Returns

string