Wow, this is the killer feature no-one told me about. I can get rid of
types? How does this work under-the-hood?

SELECT * FROM TABLE WHERE FooColumn > 50

And I've stored "Something" in that column in some row. What's the behavior?

I don't want to take up your time, so if there's a document I can read
about it'd be great.

On Mon, Jul 13, 2015 at 8:34 PM, Roger Binns <rogerb at rogerbinns.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 07/13/2015 08:00 PM, Hayden Livingston wrote:
>> Does your code also map object hierarchies in json?
>
> Yes, but thankfully I don't have much of them.  Essentially the top
> level of the object has a unique id (SQLite allocated), and then other
> tables are used to join zero or more child objects to the top level.
>
>> What general format do you use?
>
> Ultimately I use Python dictionaries which are supersets of JSON
> objects.  Some (ugly) code can convert both ways
>
>> Each object type gets stored in a separate table?
>
> In my case yes but that is because the underlying data represents
> known entities and was actually originally in Postgres and then
> exported to hideous inconsistent XML which I then convert/denormalise
> back into JSON.
>
> Do remember that SQLite does not require you to specify a type for
> each column, nor does it care about the values in a column being
> different types between rows.  That means I don't have to worry about
> types, only the big picture top level of something being an object, a
> list, or a scalar.
>
> Roger
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
>
> iEYEARECAAYFAlWkg0MACgkQmOOfHg372QRTbQCfRobbh4uU1Eqf0SD9LJxABFYj
> iv8AoKUvXNQEgGVvmPiZ/tQgHyU7Q0yL
> =S7AM
> -----END PGP SIGNATURE-----
> _______________________________________________
> sqlite-users mailing list
> sqlite-users at mailinglists.sqlite.org
> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to