Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update sqlparser #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rdbc-mysql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ rdbc = { path = "../rdbc", version = "0.1.6" }
mysql = "17.0.0"
mysql_common = "0.19.2"
twox-hash = "1.5.0"
sqlparser = "0.5.0"
sqlparser = "0.9.0"
3 changes: 2 additions & 1 deletion rdbc-mysql/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use mysql as my;
use mysql_common::constants::ColumnType;

use sqlparser::dialect::MySqlDialect;
use sqlparser::dialect::keywords::Keyword;
use sqlparser::tokenizer::{Token, Tokenizer, Word};

/// Convert a MySQL error into an RDBC error
Expand Down Expand Up @@ -222,7 +223,7 @@ fn rewrite(sql: &str, params: &[rdbc::Value]) -> rdbc::Result<String> {
Token::Word(Word {
value: param.to_string(),
quote_style: None,
keyword: "".to_owned(),
keyword: Keyword::NoKeyword,
})
}
_ => t.clone(),
Expand Down
2 changes: 1 addition & 1 deletion rdbc-postgres/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ edition = "2018"
rdbc = { path = "../rdbc", version = "0.1.6" }

postgres = "0.15.2"
sqlparser = "0.5.0"
sqlparser = "0.9.0"
3 changes: 2 additions & 1 deletion rdbc-postgres/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use postgres::rows::Rows;
use postgres::{Connection, TlsMode};

use sqlparser::dialect::PostgreSqlDialect;
use sqlparser::dialect::keywords::Keyword;
use sqlparser::tokenizer::{Token, Tokenizer, Word};

use postgres::types::Type;
Expand Down Expand Up @@ -70,7 +71,7 @@ impl rdbc::Connection for PConnection {
Token::Word(Word {
value: format!("${}", i),
quote_style: None,
keyword: "".to_owned(),
keyword: Keyword::NoKeyword,
})
}
_ => t.clone(),
Expand Down