class IndexHint extends Component

Parses an Index hint.

Properties

string $type The type of hint (USE/FORCE/IGNORE)
string $indexOrKey What the hint is for (INDEX/KEY)
string $for The clause for which this hint is (JOIN/ORDER BY/GROUP BY)
array $indexes List of indexes in this hint

Methods

static mixed
parse(Parser $parser, TokensList $list, array $options = [])

No description

static string
build(mixed $component, array $options = [])

No description

string
__toString()

Builds the string representation of a component of this type.

from Component
__construct(string $type = null, string $indexOrKey = null, string $for = null, array $indexes = [])

Constructor.

Details

at line 74
static mixed parse(Parser $parser, TokensList $list, array $options = [])

Parameters

Parser $parser the parser that serves as context
TokensList $list the list of tokens that are being parsed
array $options parameters for parsing

Return Value

mixed

at line 181
static string build(mixed $component, array $options = [])

Parameters

mixed $component the component to be built
array $options parameters for building

Return Value

string

in Component at line 73
string __toString()

Builds the string representation of a component of this type.

Return Value

string

See also

at line 59
__construct(string $type = null, string $indexOrKey = null, string $for = null, array $indexes = [])

Constructor.

Parameters

string $type the type of hint (USE/FORCE/IGNORE)
string $indexOrKey What the hint is for (INDEX/KEY)
string $for the clause for which this hint is (JOIN/ORDER BY/GROUP BY)
array $indexes List of indexes in this hint