zhum/hoplang — Issue #8: typing data read from csv
Author: canonizer
Created: 2011-11-10 19:44:58+00:00
State: open

as data are returned as strings, all 'advanced grammar features' become useless, as there isn't much one can do with strings. More can be done with integers, so we need to get integer objects (Fixnum in ruby). It is possible to do it in a number of ways:

- database driver types data values as they're read. This is preferrable. For typing, one can use:
-- suffixes in field names (_num, _time etc.), preferrable for CSV
-- explicit typing info stored in config, less preferable
-- type values based on their content, least preferrable
- values are typed depending on operator/function applied. Not advised, as this may lead to subtle bugs