SQLite data types
After searching the web for a clear list of the data types allowed in SQLite with Adobe AIR I found this link: http://livedocs.adobe.com/flex/3/langref/localDatabaseSQLSupport.html#dataTypes (from the flex 3 docs – I hope it gets updated for AIR 2.0)
It has information on the types allowed.
Here are the main points:
The following column affinity types are not supported by default in SQLite, but are supported in Adobe AIR:
- STRING: corresponding to the String class (equivalent to the TEXT column affinity).
- NUMBER: corresponding to the Number class (equivalent to the REAL column affinity).
- BOOLEAN: corresponding to the Boolean class.
- DATE: corresponding to the Date class.
- XML: corresponding to the ActionScript (E4X) XML class.
- XMLLIST: corresponding to the ActionScript (E4X) XMLList class.
- OBJECT: corresponding to the Object class or any subclass that can be serialized and deserialized using AMF3. (This includes most classes including custom classes, but excludes some classes including display objects and objects that include display objects as properties.)
The following literal values are not supported by default in SQLite, but are supported in Adobe AIR:
- true: used to represent the literal boolean value true, for working with BOOLEAN columns.
- false: used to represent the literal boolean value false, for working with BOOLEAN columns.
Each column in the database is assigned one of the following type affinities:
- TEXT (or STRING)
- REAL (or NUMBER)
For a full description of the above see the docs: http://livedocs.adobe.com/flex/3/langref/localDatabaseSQLSupport.html#dataTypes
I’m quite excited that you can store an ActionScript Object in a table; I’ll have to do some experiments to see how good this is.
This entry was posted on Monday, November 30th, 2009 at 12:56 pm and is filed under Air, SQLite. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.