containKeywords()
containKeywords(string $awqlString,array<mixed,string> $clauseKeywords,boolean $containAll): boolean
Checks if an AWQL string contains certain clauses by searching for
the clause opening keywords.
Parameters
string |
$awqlString |
the AWQL string to check |
array<mixed,string> |
$clauseKeywords |
the clause opening keywords (e.g. SELECT,
FROM, WHERE, ORDER BY) to search |
boolean |
$containAll |
whether the AWQL string should contain all of
the given keywords. Set to false for checking whether the AWQL
string should contain any of the given keywords |
Returns
boolean —true if the AWQL string contains all or any the clause
keywords accordingly to the $containAll
parameter; Otherwise,
returns false