mcylinder's avatar

JSON Column types with Sqlite

Has anyone successfully loaded the Sqlite extension JSON1 when using Sqlite as their configured database? I'm interested now that Laravel 5.4 supports querying JSON column types. It makes sense for MySQL 5.7 and Postgres, but I was curious to other possibilities.

https://www.sqlite.org/json1.html

0 likes
4 replies
ivanv's avatar

I'm also having issues with this...

I managed to install sqlite with json support with Homebrew thanks to http://www.sourceweaver.com/post/133474396355/homebrew-install-of-sqlite-json-extension :

brew install sqlite3 --with-json1 --with-fts5

And then set this in php.ini:

[sqlite3]
sqlite3.extension_dir=/usr/local/opt/sqlite/include

Then restart the service:

sudo brew services restart php71

But it's still not working... If anyone has any other ideas...?

Alex360hd's avatar

+1 to this, I would like to know if you can use the 5.3+ where statements on JSON columns with SQLite database (and JSON1 extension enabled).

Like that :

->where('meta->favorite_color', 'red')

Please or to participate in this conversation.