Skip to content

Timestamp data type #230

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

Open
wants to merge 3 commits into
base: feat/proxy-eql-v2-integration
Choose a base branch
from

Conversation

tobyhede
Copy link
Contributor

  • adds handling for timestamp data type from_sql
  • test to map timestamp
  • add missing biguint to_sql implementation at no extra charge

Copy link
Contributor

@yujiyokoo yujiyokoo left a comment

Choose a reason for hiding this comment

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

LGTM

let client = connect_with_tls(PROXY).await;

let id = id();
let encrypted_timestamp = "2000-10-01T17:30:00Z".parse::<DateTime<Utc>>().unwrap();
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be a good idea to add another test case set in a different time zone than UTC?

@@ -47,8 +49,10 @@ fn binary_to_sql(plaintext: &Plaintext) -> Result<BytesMut, Error> {
Plaintext::Utf8Str(x) => x.to_sql_checked(&Type::TEXT, &mut bytes),
Plaintext::JsonB(x) => x.to_sql_checked(&Type::JSONB, &mut bytes),
Plaintext::Decimal(x) => x.to_sql_checked(&Type::NUMERIC, &mut bytes),
// TODO: Implement these
Plaintext::BigUInt(_x) => unimplemented!(),
Plaintext::BigUInt(x) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this needed here for timestamp, or is this a separate implementation? If so, is this covered with a test case?

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.

2 participants