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

Preserve string values on data set reading #65

Merged
merged 2 commits into from
Sep 14, 2020

Conversation

Enet4
Copy link
Owner

@Enet4 Enet4 commented Aug 28, 2020

This resolves #9. It introduces configurable value reading strategies (ValueReadStrategy) at data set reading level and makes Preserve the default one. Quoting from the documentation:

Values will be stored without decoding dates or textual numbers.
Word-sized binary values are read according to the expected byte order.
Date-time values and numbers are kept in their original string representation as string objects.
All text is still decoded into Rust string values, in accordance to the standard, unless its value representation is unknown to the decoder.

With #56 already present, working with PrimitiveValue should be easy enough, performing the conversions to binary numbers and date/time/datetime only when necessary via the methods added there.

Note also that this does not exclude the eventual attribute abstraction, which will exist at the object level and even work with values which are not necessarily in memory. Everything should hopefully fit like puzzle pieces once this one is done.

- add ValueReadStrategy
- add DataSetReaderOptions to let the user
  configure the value reading strategy
- change the default data set reading strategy
  to Preserved (once Interpreted)
@Enet4 Enet4 force-pushed the imp/parser/preserve-string-values branch from 8d39bfc to fa59478 Compare September 13, 2020 22:12
@Enet4 Enet4 merged commit 0f797a3 into master Sep 14, 2020
@Enet4 Enet4 deleted the imp/parser/preserve-string-values branch September 14, 2020 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interpreting string-based values?
1 participant