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

Store dates as ISO-8601 formatted strings #228

Merged
merged 6 commits into from Feb 6, 2018

Conversation

andrykonchin
Copy link
Member

Similar to #223

  • handle store_as_string field option for date fields
  • rename datetime option store_as_native_string to store_as_string
  • add global config options store_datetime_as_string and store_date_as_string

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 97.423% when pulling b8106e4 on store-dates-as-string into 5b56a85 on master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 97.423% when pulling b8106e4 on store-dates-as-string into 5b56a85 on master.

@coveralls
Copy link

coveralls commented Feb 4, 2018

Coverage Status

Coverage increased (+0.04%) to 97.423% when pulling b8106e4 on store-dates-as-string into 5b56a85 on master.

Copy link
Member

@pboling pboling left a comment

Choose a reason for hiding this comment

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

This looks excellent.

? Dynamoid.config.store_date_as_string \
: options[:store_as_string]

unless use_string_format
Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you write it this way to optimize for fact that it'll likely be false?

Copy link
Member Author

Choose a reason for hiding this comment

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

@richardhsu Yep. I consider numeric format as a common case and string one as an exception.

@andrykonchin andrykonchin merged commit 5b7734c into master Feb 6, 2018
@andrykonchin andrykonchin deleted the store-dates-as-string branch February 6, 2018 08:38
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

4 participants