#1 2022-02-27 14:43:18

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

SQLite 3.38.0 supports JSON path in query now!

You can now query JSON stored in a table like this:

select id, name, interests from user 
where interests->'likes'->>'[0]' = 'skating';

It's very convenient!

More details: https://tirkarthi.github.io/programming … ments.html

Last edited by edwinsn (2022-02-28 13:36:10)


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#2 2022-02-27 15:43:45

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: SQLite 3.38.0 supports JSON path in query now!

Yes, this is a powerful notation.

In respect to PostgreSQL, the next big missing feature is JSONB - maybe for a future SQlite3 version, as the article details!
But the fact that we can create an index from a JSON field is already very useful.

I will include this new SQLite3 version to both mORMot 1 and mORMot 2.

Offline

#3 2022-02-28 09:17:19

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: SQLite 3.38.0 supports JSON path in query now!

I just have included the latest 3.38.0 statics for both mORMot 1 and mORMot 2.
smile

https://github.com/synopse/mORMot2/commit/84145004

The new https://synopse.info/files/mormot2static.7z binaries need to be downloaded.

Offline

#4 2022-02-28 13:34:19

edwinsn
Member
Registered: 2010-07-02
Posts: 1,218

Re: SQLite 3.38.0 supports JSON path in query now!

Great! Downloading wink

Thanks for your great job, as aways!

Last edited by edwinsn (2022-02-28 13:34:36)


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

Board footer

Powered by FluxBB