PHP Class GDS\Mapper\ProtoBufGQLParser

Author: Tom Walder ([email protected])
Afficher le fichier Open project: tomwalder/php-gds Class Usage Examples

Protected Properties

Свойство Type Description
$obj_schema GDS\Schema | null This is optional, because Google Datastore is schemaless.

Méthodes publiques

Méthode Description
__construct ( Schema $obj_schema = null ) Optionally, reference to the Entity schema to check type validity
getEndCursor ( ) : string Get any end cursor
getFilters ( ) : array Get any filters
getKind ( ) : string Get the query Kind
getLimit ( ) : integer Get the query limit
getOffset ( ) : integer Get the offset
getOrderBy ( ) : array Get any order bys
getStartCursor ( ) : string Get any start cursor
parse ( $str_gql, google\appengine\datastore\v4\GqlQueryArg[] $arr_named_params = [] ) Turn a GQL string and parameter array into a "lookup" query

Private Methods

Méthode Description
getIntStringFromValue ( $mix_val ) : array Extract a string/int tuple from the value. Used for offsets and limits which can be string cursors or integers
lookupToken ( $str_val ) : mixed Lookup the field in our token & named parameter list
recordKind ( $arr ) : string Record the Kind
recordLimit ( $arr ) : string Record the limit
recordOffset ( $arr ) : string Record the offset
recordOrder ( $arr ) : string Process the ORDER BY clause
recordWhere ( $arr ) : string Process the WHERE clause
tokenizeQuoted ( $arr ) : string Record quoted strings, return simple tokens

Method Details

__construct() public méthode

Optionally, reference to the Entity schema to check type validity
public __construct ( Schema $obj_schema = null )
$obj_schema GDS\Schema

getEndCursor() public méthode

Get any end cursor
public getEndCursor ( ) : string
Résultat string

getFilters() public méthode

Get any filters
public getFilters ( ) : array
Résultat array

getKind() public méthode

Get the query Kind
public getKind ( ) : string
Résultat string

getLimit() public méthode

Get the query limit
public getLimit ( ) : integer
Résultat integer

getOffset() public méthode

Get the offset
public getOffset ( ) : integer
Résultat integer

getOrderBy() public méthode

Get any order bys
public getOrderBy ( ) : array
Résultat array

getStartCursor() public méthode

Get any start cursor
public getStartCursor ( ) : string
Résultat string

parse() public méthode

We use preg_replace_callback to "prune" down the GQL string so we are left with nothing
public parse ( $str_gql, google\appengine\datastore\v4\GqlQueryArg[] $arr_named_params = [] )
$str_gql
$arr_named_params google\appengine\datastore\v4\GqlQueryArg[]

Property Details

$obj_schema protected_oe property

This is optional, because Google Datastore is schemaless.
protected Schema,GDS|null $obj_schema
Résultat GDS\Schema | null