-
Notifications
You must be signed in to change notification settings - Fork 13
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
Conversation
Thank you for your contribution! Would you mind adding a unit test for this change? |
Added tests and confirmed it passed in local |
Sorry, I put some comments to #25. Could you take a look into it? Thanks! |
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}; |
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.
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.
tests/test-async.rs
Outdated
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"); |
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.
Would you mind reverting these change as #25? (Sorry for the confusion)
src/row.rs
Outdated
/// The index of the column in the row | ||
pub index: usize, |
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.
SnowflakeColumn
might be a better place to put index
than SnowflakeColumnType
since it's not related to the type.
4af6ce6
to
f168934
Compare
Signed-off-by: Raiki Tamura <[email protected]>
f168934
to
4338699
Compare
Fixed and squash commits |
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.
Thank you! It looks good to me. Let me merge and publish it.
v0.2.1 is now published! Thank you for your contribution! |
No description provided.