Support for further native SQL(ite) types char, varchar, ...
Brought to you by:
hwellmann
Current datascript compiler maps datascript integer types correctly into sqlite types. All other ds types that are used for slq column definitions, are only mapped into BLOB, even string.
I propose to support further sql/sqlite data types:
Priority 1 (needed for name and update BBs)
varchar
text
Priority 2 (likey needed later)
float (double)
timestamp
Mapping should be simply 1:1 into SQL columns when used for table declaration.
Logged In: YES
user_id=1858234
Originator: YES
Dear ,
is there any chance that in the next release of rds at least the mapping of a varchar / text type into native SQL is supported? This would be of great help for the version tables.
Thanks in advance,
Uli.
Logged In: YES
user_id=601556
Originator: NO
Reworking string and character support consistently throughout rds requires some effort.
For the time being, we can introduce the following rules for mapping DataScript types to SQL column types within an sql_table:
uint8 foo[n] -> CHAR(n) where n is an integer literal
string -> VARCHAR
Note than SQLite's VARCHAR does not require a maximum length.
The uint8 to CHAR mapping only makes sense for 7-bit ASCII.
Different character encodings are currently beyond the scope of DataScript.
Logged In: YES
user_id=601556
Originator: NO
Probably while implementing this feature, integer columns where broken and are now represented as BLOBs. This needs to be fixed.
Implement a test case that verifies the correct types for all options.
For the user, this bug should have no crucial effect, since SQLite internally works with typeless columns.
Logged In: YES
user_id=1858234
Originator: YES
I cross checked with latest head revision 405, the int types are still translated into BLOB.
Cheers,
Uli.
Logged In: YES
user_id=601556
Originator: NO
At least in the Name BB PhysicalModel-1.4.1, INTEGER types do appear in SQL. If your problems persist, please provide a specific example.