-
Notifications
You must be signed in to change notification settings - Fork 606
Mysql: Add SRID
column option
#1852
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
base: main
Are you sure you want to change the base?
Conversation
Add support for Mysql geometric `SRID {int}` column def in create table statements.
I give up on the CI. I understand the error, but idk why it's showing specifically on this PR. Clippy passes locally, I guess that the CI doesn't use a fixed cargo/clippy version, and that these warnings were introduced recently. Edit: Yup, can see a toolchain update was introduced today. Pulling that and running Clippy shows the same warnings ... |
fn test_mysql_srid_create_table() { | ||
let sql = r#"CREATE TABLE t (a geometry SRID 4326)"#; | ||
let ast: Vec<Statement> = Parser::parse_sql(&MySqlDialect {}, sql).unwrap(); | ||
|
||
assert_eq!(ast.len(), 1); | ||
if let Statement::CreateTable(v) = &ast[0] { | ||
assert_eq!( | ||
v.columns[0].options[0].option, | ||
ColumnOption::Srid(Box::new(Expr::value(Value::Number( | ||
"4326".parse().unwrap(), | ||
false | ||
)))) | ||
); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we instead extend one of the create table tests in either common or mysql tests file? (essentially this test ideally would live in one of those files I think)
Add support for Mysql geometric
SRID {int}
column option in create table statements.