1
- # An SQLite3 Compatible SQL parser
1
+ # An SQL query parser
2
+
3
+ <br />
2
4
3
5
[ db-academy.io/sql_parser] ( https://db-academy.io/sql_parser ) reference implementation in Rust
4
6
7
+ <br />
8
+
5
9
The following list of statements is ordered not only by difficulty but also by
6
10
the time required for implementation, from easier and quicker to harder and
7
11
more time-consuming. There are exceptions where certain statements are simpler
@@ -11,7 +15,7 @@ intentional, made solely for grouping related statements together.
11
15
The items were taken from the official SQLite documentation
12
16
[ here] ( https://www.sqlite.org/lang.html )
13
17
14
- ## Simple statements ![ progress] ( https://progress-bar.xyz/14/?scale=14&suffix=%%%20(14%20of%2014)&width=140 )
18
+ ### Simple statements ![ progress] ( https://progress-bar.xyz/14/?scale=14&suffix=%%%20(14%20of%2014)&width=140 )
15
19
1 . [ drop-table-stmt] ( https://www.sqlite.org/lang_droptable.html ) ✅ ;
16
20
1 . [ drop-index-stmt] ( https://www.sqlite.org/lang_dropindex.html ) ✅ ;
17
21
1 . [ drop-trigger-stmt] ( https://www.sqlite.org/lang_droptrigger.html ) ✅ ;
@@ -27,9 +31,9 @@ The items were taken from the official SQLite documentation
27
31
1 . [ rollback-stmt] ( https://www.sqlite.org/lang_savepoint.html ) ✅ ;
28
32
1 . [ pragma-stmt] ( https://www.sqlite.org/pragma.html ) ✅ ;
29
33
30
- ## Intermediate statements
34
+ ### Intermediate statements
31
35
32
- ### Parsing sql expr ![ progress] ( https://progress-bar.xyz/17/?scale=17&suffix=%%%20(17%20of%2017)&width=140 )
36
+ #### Parsing sql expr ![ progress] ( https://progress-bar.xyz/17/?scale=17&suffix=%%%20(17%20of%2017)&width=140 )
33
37
1 . [ literal-value] ( https://www.sqlite.org/lang_expr.html#literalvalue ) ✅ ;
34
38
1 . [ bind-parameter] ( https://www.sqlite.org/lang_expr.html#bindvar ) ✅ ;
35
39
1 . [ identifiers] ( https://www.sqlite.org/lang_expr.html#columnname ) ✅ ;
@@ -48,44 +52,44 @@ The items were taken from the official SQLite documentation
48
52
1 . [ case-expression] ( https://www.sqlite.org/lang_expr.html#caseexp ) ✅ ;
49
53
1 . [ raise-function] ( https://www.sqlite.org/lang_expr.html#raisefunc ) ✅ ;
50
54
51
- ### Parsing sql statements ![ progress] ( https://progress-bar.xyz/2/?scale=2&suffix=%%%20(2%20of%202)&width=140 )
55
+ #### Parsing sql statements ![ progress] ( https://progress-bar.xyz/2/?scale=2&suffix=%%%20(2%20of%202)&width=140 )
52
56
1 . [ attach-stmt] ( https://www.sqlite.org/lang_attach.html ) ✅ ;
53
57
1 . [ alter-table-stmt] ( https://www.sqlite.org/lang_altertable.html ) ✅ ;
54
58
55
- ## Advanced statements ![ progress] ( https://progress-bar.xyz/0/?scale=19&suffix=%%%20(0%20of%2019)&width=140 )
59
+ ### Advanced statements ![ progress] ( https://progress-bar.xyz/0/?scale=19&suffix=%%%20(0%20of%2019)&width=140 )
56
60
57
- ### SELECT Statement ![ progress] ( https://progress-bar.xyz/0/?scale=4&suffix=%%%20(0%20of%204)&width=140 )
61
+ #### SELECT Statement ![ progress] ( https://progress-bar.xyz/0/?scale=4&suffix=%%%20(0%20of%204)&width=140 )
58
62
1 . indexed-by-part
59
63
1 . window-functions-part
60
64
1 . select-stmt
61
65
1 . with-clause-part (CTE)
62
66
63
- ### INSERT Statement ![ progress] ( https://progress-bar.xyz/0/?scale=5&suffix=%%%20(0%20of%205)&width=140 )
67
+ #### INSERT Statement ![ progress] ( https://progress-bar.xyz/0/?scale=5&suffix=%%%20(0%20of%205)&width=140 )
64
68
1 . on-conflict-clause-part
65
69
1 . returning-clause-part
66
70
1 . upsert-part
67
71
1 . insert-stmt
68
72
1 . replace-stmt
69
73
70
- ### CREATE Statements ![ progress] ( https://progress-bar.xyz/0/?scale=45&suffix=%%%20(0%20of%205)&width=140 )
74
+ #### CREATE Statements ![ progress] ( https://progress-bar.xyz/0/?scale=45&suffix=%%%20(0%20of%205)&width=140 )
71
75
1 . create-virtual-table-stmt
72
76
1 . create-index-stmt
73
77
1 . create-view-stmt
74
78
1 . create-table-stmt
75
79
1 . create-trigger-stmt
76
80
77
- ### DELETE Statements ![ progress] ( https://progress-bar.xyz/0/?scale=2&suffix=%%%20(0%20of%202)&width=140 )
81
+ #### DELETE Statements ![ progress] ( https://progress-bar.xyz/0/?scale=2&suffix=%%%20(0%20of%202)&width=140 )
78
82
1 . delete-stmt
79
83
1 . delete-stmt-limited
80
84
81
- ### UPDATE Statements ![ progress] ( https://progress-bar.xyz/0/?scale=2&suffix=%%%20(0%20of%202)&width=140 )
85
+ #### UPDATE Statements ![ progress] ( https://progress-bar.xyz/0/?scale=2&suffix=%%%20(0%20of%202)&width=140 )
82
86
1 . update-stmt
83
87
1 . update-stmt-limited
84
88
85
- ### EXPLAIN Statements ![ progress] ( https://progress-bar.xyz/0/?scale=1&suffix=%%%20(0%20of%201)&width=140 )
89
+ #### EXPLAIN Statements ![ progress] ( https://progress-bar.xyz/0/?scale=1&suffix=%%%20(0%20of%201)&width=140 )
86
90
1 . explain-stmt
87
91
88
- ## Optional statements ![ progress] ( https://progress-bar.xyz/0/?scale=5&suffix=%%%20(0%20of%205)&width=140 )
92
+ #### Optional statements ![ progress] ( https://progress-bar.xyz/0/?scale=5&suffix=%%%20(0%20of%205)&width=140 )
89
93
1 . [ math-functions] ( https://www.sqlite.org/lang_mathfunc.html )
90
94
1 . [ date-and-time-functions] ( https://www.sqlite.org/lang_datefunc.html )
91
95
1 . [ json-functions] ( https://www.sqlite.org/json1.html )
0 commit comments