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.

4 Comments so far

  1. Hi,

    Were you able to perform any experiments on storing actionscript objects in SQLite tables and retrieving them? If yes were you successful?

  2. 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

  3. [...] CV « SQLite data types [...]

  4. 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.

Have your say

Fields in bold are required. Email addresses are never published or distributed.

Some HTML code is allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
URIs must be fully qualified (eg: http://www.domainname.com) and all tags must be properly closed.

Line breaks and paragraphs are automatically converted.

Please keep comments relevant. Off-topic, offensive or inappropriate comments may be edited or removed.

  1. Search Website

  2. Latest Videos

  3. Categories

  4. Archives

  5. Latest Tweets