Thursday, April 4, 2013

Be Aware: Sqlite uses a dynamic data type system


For additional information, sqlite3 uses a dynamic data type system. so anything past these:
  • NULL
  • INTEGER
  • REAL
  • TEXT
  • BLOB
are just hints to sqlite (technically, affinity), and it'll end up deciding on its own what type it is or is not.
the functions that return doubles, ints, etc are part of the sqlite C API try its best to give you what you want.... so what's stored in a column can potentially be converted by sqlite if what you're asking for is different from what's in the db.
about midway down, there's a handy table that'll let you know what to expect.

No comments:

Post a Comment