pub enum Rule {
Show 19 variants
WHITESPACE,
SELECT,
FROM,
WHERE,
identifier,
number,
string,
boolean,
operator,
function_name,
table,
select_query,
select_list,
star,
select_item,
function_call,
where_clause,
condition,
value,
}
Variants§
WHITESPACE
Matches any amount of whitespace (spaces, tabs, newlines).
SELECT
Matches the select
keyword in a query.
FROM
Matches the from
keyword in a query.
WHERE
Matches the where
keyword in a query.
identifier
Matches an identifier, such as column or table names. Identifiers start with a letter or underscore and can contain alphanumeric characters and underscores.
number
Matches numeric literals, including optional negative sign.
string
Matches string literals enclosed in single quotes.
boolean
Matches boolean literals (true
or false
).
operator
Matches operators such as =
, !=
, >=
, <=
, <
, and >
.
function_name
Matches the name of a function, consisting of alphanumeric characters and underscores.
table
Matches a table name or a subquery enclosed in parentheses.
select_query
Matches an entire select
query.
Consists of a select
keyword, a list of columns, a from
clause, and an optional where
clause.
select_list
Matches a list of items in the select
clause.
Items are separated by commas.
star
Matches the *
character used to select all columns.
select_item
Matches a single item in the select
clause.
Items can be columns, function calls, or the *
character.
function_call
Matches a function call with a name and optional arguments.
Arguments can be columns, other function calls, or the *
character.
where_clause
Matches the where
clause of a query.
Consists of the where
keyword followed by a condition.
condition
Matches a condition in the where
clause.
Consists of an identifier, an operator, and a value.
value
Matches a value in the query. Values can be strings, numbers, or boolean literals.