Closed acook closed 10 years ago
Sweet, thanks!
Also, now that you mention it, we've already got constants for (well, some of) the SQL types to serialize them to the database:
TextValue
NumericValue
TimestampValue
We could subclass them to get the proper ones and then use those classes via your mappings here to get the proper classes to serialize them instead of a chain of if
or when
statements.
This would then provide the direct mapping we need and we could also include a sql_type_name
(or similar) method on those objects to give the appropriate string when we need it in the DB. I'll create a new issue for this.
Created here: #16
A next step might be to make constants for the SQL types.