FqlQueryParser
Namespace: FoundationDB.Client · class
Parser for FQL queries
Methods
Parse
static FqlQuery Parse(ReadOnlySpan<char> text, FqlParsingOptions options = 0)
Parses a text literal that contains an FQL query, into the equivalent query expression
text— Text that contains a valid FQL statementoptions— Parsing options (uses Default if not specified)
Returns: Expression that represents the content of the query text
ParseNext
static Maybe<FqlQuery> ParseNext(ReadOnlySpan<char> text, FqlParsingOptions options, out ReadOnlySpan<char> rest)
Parses an FQL query from a text snippet into a query expression, plus any text remainder
text— Text that contains an FQL query, optionally followed by extra text that is not part of the queryoptions— Parsing options (uses Default if not specified)rest— Receives the rest of the text after the query, or empty if the query ended at the last character
Returns: Either the parsed query, or an error condition if the query was invalid or malformed
This method is intended to parse queries that would be part of a command line or prompt, that would include additional arguments or options after the query.
It will parse up to the logical end of a query, usually the first unescaped space, or closing parens following after a valid query.