Skip to content

Commit 3b133f5

Browse files
committed
update sqlparser
fixes: MySQL's `REGEXP` binary operator is not supported #107 and answers #109
1 parent 9780a11 commit 3b133f5

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
- `sqlpage.variables('get')` returns a json object containing all url parameters. Inside `/my_page.sql?x=1&y=2`, it returns the string `'{"x":"1","y":"2"}'`
1010
- `sqlpage.variables('post')` returns a json object containg all variables passed through a form. This makes it much easier to handle a form with a variable number of fields.
1111
- Remove systematic casting in SQL of all parameters to `TEXT`. The supported databases understand the type of the parameters natively.
12+
- Some advanced or database-specific SQL syntax that previously failed to parse inside SQLPage is now supported. See [updates in SQLParser](https://github.com/sqlparser-rs/sqlparser-rs/blob/main/CHANGELOG.md#added)
1213

1314
## 0.14.0 (2023-10-19)
1415

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ anyhow = "1"
3434
serde = "1"
3535
serde_json = { version = "1.0.82", features = ["preserve_order"] }
3636
lambda-web = { version = "0.2.1", features = ["actix4"], optional = true }
37-
sqlparser = { version = "0.38.0", features = ["visitor"] }
37+
sqlparser = { version = "0.39.0", features = ["visitor"] }
3838
async-stream = "0.3"
3939
async-trait = "0.1.61"
4040
async-recursion = "1.0.0"

src/webserver/database/sql.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -524,6 +524,8 @@ impl VisitorMut for ParameterExtractor {
524524
FunctionArg::Unnamed(FunctionArgExpr::Expr(right)),
525525
],
526526
over: None,
527+
filter: None,
528+
null_treatment: None,
527529
distinct: false,
528530
special: false,
529531
order_by: vec![],

0 commit comments

Comments
 (0)