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

Timestamp type #94

Merged
merged 2 commits into from
Sep 25, 2018
Merged

Timestamp type #94

merged 2 commits into from
Sep 25, 2018

Conversation

sfc-gh-kwagner
Copy link
Contributor

Implemented SF_TIMESTAMP type as well as associated timestamp creation and get functions. Updated existing code to use new SF_TIMESTAMP type. Added a function to transform a column into a timestamp type. Added test case to test all get functions.

…n and get functions. Updated existing code to use new SF_TIMESTAMP type. Added a function to transform a column into a timestamp type. Added test case to test all get functions.
@sfc-gh-kwagner
Copy link
Contributor Author

This PR only deals with receiving data from the C API using the SF_TIMESTAMP struct. A future PR will deal with input binding of the timestamp type.

column->valuestring,
sfstmt->connection->timezone,
sfstmt->desc[idx - 1].scale)) {
case SF_DB_TYPE_TIMESTAMP_TZ: ;
Copy link
Contributor

Choose a reason for hiding this comment

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

is this semicolon required?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, C expects a statement after the case keyword (because its just a label, similar to goto), so I can't declare a variable until after there is a statement, which is just the semicolon.

Copy link
Contributor

@smtakeda smtakeda left a comment

Choose a reason for hiding this comment

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

LGTM.

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