Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.6] Support JSON SELECT queries on SQLite #4452

Merged
merged 1 commit into from
Aug 27, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ The query above will produce the following SQL:
<a name="json-where-clauses"></a>
### JSON Where Clauses

Laravel also supports querying JSON column types on databases that provide support for JSON column types. Currently, this includes MySQL 5.7, PostgreSQL, and SQL Server 2016. To query a JSON column, use the `->` operator:
Laravel also supports querying JSON column types on databases that provide support for JSON column types. Currently, this includes MySQL 5.7, PostgreSQL, SQL Server 2016, and SQLite 3.9.0 (with the [JSON1 extension](https://www.sqlite.org/json1.html)). To query a JSON column, use the `->` operator:

$users = DB::table('users')
->where('options->language', 'en')
Expand All @@ -479,7 +479,7 @@ Laravel also supports querying JSON column types on databases that provide suppo
->where('preferences->dining->meal', 'salad')
->get();

You may use `whereJsonContains` to query JSON arrays:
You may use `whereJsonContains` to query JSON arrays (not supported on SQLite):

$users = DB::table('users')
->whereJsonContains('options->languages', 'en')
Expand Down