Menu

#9 Support for further native SQL(ite) types char, varchar, ...

open
5
2007-11-29
2007-08-01
Uli Otto
No

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.

Discussion

  • Uli Otto

    Uli Otto - 2007-10-08

    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.

     
  • Harald Wellmann

    Harald Wellmann - 2007-10-19

    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.

     
  • Harald Wellmann

    Harald Wellmann - 2007-10-19
    • assigned_to: nobody --> hwedekind
     
  • hwedekind

    hwedekind - 2007-10-24
    • status: open --> closed
     
  • Harald Wellmann

    Harald Wellmann - 2007-10-31

    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.

     
  • Harald Wellmann

    Harald Wellmann - 2007-10-31
    • status: closed --> open
     
  • hwedekind

    hwedekind - 2007-11-23
    • status: open --> closed
     
  • Uli Otto

    Uli Otto - 2007-11-29
    • status: closed --> open
     
  • Uli Otto

    Uli Otto - 2007-11-29

    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.

     
  • Harald Wellmann

    Harald Wellmann - 2007-11-29

    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.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.