Navigation Menu

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

Support for variable length datetimes. #37

Merged
merged 8 commits into from Oct 4, 2018
Merged

Conversation

alanamarzoev
Copy link
Contributor

No description provided.

Cargo.toml Outdated
homepage = "https://github.com/ms705/nom-sql"
repository = "https://github.com/ms705/nom-sql.git"
homepage = "https://github.com/alanamarzoev/nom-sql"
repository = "https://github.com/alanamarzoev/nom-sql.git"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change seems wrong?

src/common.rs Outdated
len: opt!(delimited!(tag!("("), digit, tag!(")"))) >>
(SqlType::DateTime(match len {
Some(len) => len_as_u16(len),
None => 32 as u16,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out that the "length" of a DATETIME is the "fractional seconds precision" (fsp), and the default is zero.

Can we change the default to 0, and name the parameter fsp or precision?

@ms705 ms705 merged commit 4354d8b into ms705:master Oct 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants