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

Add methods to get type information #24

Merged
merged 2 commits into from
May 17, 2024

Conversation

tamaroning
Copy link
Collaborator

No description provided.

@kenkoooo
Copy link
Member

Thank you for your contribution! Would you mind adding a unit test for this change?

@tamaroning
Copy link
Collaborator Author

Added tests and confirmed it passed in local

@kenkoooo
Copy link
Member

Sorry, I put some comments to #25. Could you take a look into it? Thanks!

@tamaroning
Copy link
Collaborator Author

Thank you for reviewing. This PR is now ready to be merged.

src/lib.rs Outdated
@@ -44,7 +44,7 @@ mod session;
use std::time::Duration;

pub use error::{Error, Result};
pub use row::{SnowflakeDecode, SnowflakeRow};
pub use row::{SnowflakeColumn, SnowflakeColumnType, SnowflakeDecode, SnowflakeRow};
Copy link
Member

Choose a reason for hiding this comment

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

Since we don't guarantee the behavior of these structs, let's not export them for now. If we want to export them in the future, we can do so without breaking backward compatibility.

Comment on lines 30 to 35
let query = r#"CALL SYSTEM$WAIT(3)"#;
let rows = session.query(query).await?;

// Assert
assert_eq!(rows.len(), 1);
assert_eq!(rows[0].get::<String>("SYSTEM$WAIT")?, "waited 120 seconds");
assert_eq!(rows[0].get::<String>("SYSTEM$WAIT")?, "waited 3 seconds");
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind reverting these change as #25? (Sorry for the confusion)

src/row.rs Outdated
Comment on lines 15 to 16
/// The index of the column in the row
pub index: usize,
Copy link
Member

Choose a reason for hiding this comment

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

SnowflakeColumn might be a better place to put index than SnowflakeColumnType since it's not related to the type.

Signed-off-by: Raiki Tamura <[email protected]>
@tamaroning
Copy link
Collaborator Author

Fixed and squash commits

Copy link
Member

@kenkoooo kenkoooo left a comment

Choose a reason for hiding this comment

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

Thank you! It looks good to me. Let me merge and publish it.

@kenkoooo kenkoooo merged commit c68d464 into estie-inc:main May 17, 2024
0 of 6 checks passed
@kenkoooo
Copy link
Member

v0.2.1 is now published! Thank you for your contribution!

@tamaroning tamaroning deleted the feat/row-types branch May 18, 2024 04:43
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