Skip to content

Commit

Permalink
update sqlparser
Browse files Browse the repository at this point in the history
fixes: MySQL's `REGEXP` binary operator is not supported #107

and answers #109
  • Loading branch information
lovasoa committed Oct 29, 2023
1 parent 9780a11 commit 3b133f5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- `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"}'`
- `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.
- Remove systematic casting in SQL of all parameters to `TEXT`. The supported databases understand the type of the parameters natively.
- 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)

## 0.14.0 (2023-10-19)

Expand Down
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ anyhow = "1"
serde = "1"
serde_json = { version = "1.0.82", features = ["preserve_order"] }
lambda-web = { version = "0.2.1", features = ["actix4"], optional = true }
sqlparser = { version = "0.38.0", features = ["visitor"] }
sqlparser = { version = "0.39.0", features = ["visitor"] }
async-stream = "0.3"
async-trait = "0.1.61"
async-recursion = "1.0.0"
Expand Down
2 changes: 2 additions & 0 deletions src/webserver/database/sql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ impl VisitorMut for ParameterExtractor {
FunctionArg::Unnamed(FunctionArgExpr::Expr(right)),
],
over: None,
filter: None,
null_treatment: None,
distinct: false,
special: false,
order_by: vec![],
Expand Down

0 comments on commit 3b133f5

Please sign in to comment.