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)
- NUMERIC
- INTEGER
- REAL (or NUMBER)
- BOOLEAN
- DATE
- XML
- XMLLIST
- OBJECT
- NONE
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.






on 07/01/2010 at 3:11 am Sankalp Kallakuri wrote:
Hi,
Were you able to perform any experiments on storing actionscript objects in SQLite tables and retrieving them? If yes were you successful?
on 10/01/2010 at 4:42 pm Sam Hassan wrote:
No I haven’t had a chance to store a custom object but I am using Date objects in a current project which is saving a lot of time
on 20/01/2010 at 6:17 pm Storing an ActionScript Object class in SQLite with AIR | This'N'That wrote:
[...] CV « SQLite data types [...]
on 20/01/2010 at 6:19 pm Sam Hassan wrote:
I’ve posted an example of storing ActionScrip Objects in SQLite: http://samhassan.co.uk/blog/2010/01/20/storing-an-actionscript-object-class-in-sqlite-with-air/
sam.