Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
picodata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
picodata
Commits
093ddb52
Commit
093ddb52
authored
2 years ago
by
Alexander Tolstoy
Committed by
Denis Smirnov
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
docs: add railroad diagrams (eBNF) for Sbroad queries
parent
ca630799
No related branches found
No related tags found
1 merge request
!1414
sbroad import
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/sql/query.ebnf
+49
-0
49 additions, 0 deletions
doc/sql/query.ebnf
with
49 additions
and
0 deletions
doc/sql/query.ebnf
0 → 100644
+
49
−
0
View file @
093ddb52
Query ::= Select | Select 'union all' Select | Select ('except' | 'except distinct') Select | Values | Insert
Select ::= 'select' (Column (',' Column)*) 'from' (Table | Select) ('as' Alias)? ( ('inner')? 'join' (Table | Select) ('as' Alias)? 'on' Expression )? ( 'group by' GroupBy )? ( 'where' Expression )?
Column ::= '*' | Table '.' '*' | Expression | Expression 'as' Alias
Expression ::= Expression 'or' Expression
| Expression 'and' Expression
| Expression '*' Expression
| Expression '/' Expression
| Expression '+' Expression
| Expression '-' Expression
| Expression '=' Expression
| Expression '>' Expression
| Expression '>=' Expression
| Expression '<' Expression
| Expression '<=' Expression
| Expression ('<>' | '!=') Expression
| Expression 'is null'
| Expression 'is not null'
| Expression 'between' Expression 'and' Expression
| Reference
| Select
| Value
GroupBy ::= Concat | Cast | Function | Reference
Reference ::= ((Table | '"' Table '"') '.')? (Alias | '"' Alias '"')
Value ::= 'true'
| 'false'
| 'null'
| '?'
| Integer
| Unsigned
| Double
| Decimal
| String
| Row
Cast ::= 'cast' '(' Expression 'as' Type ')'
Type ::= 'any'
| 'bool'
| 'boolean'
| 'decimal'
| 'double'
| 'int'
| 'integer'
| 'number'
| 'scalar'
| 'string'
| 'text'
| 'unsigned'
| 'varchar' ('(' Length ')')?
Insert ::= 'insert into' Table ('(' Reference (',' Reference)* ')')? (Select | Values)
Values ::= 'values' '(' (Value (',' Value)*) ')' (',' '(' (Value (',' Value)*) ')')*
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment