loopbackio / loopbackio/loopback-connector-sqlite3

REQ: JSON query using the extract (->) operator

Open
#52 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
13
Forks
21
PR merge metrics
No merged PRs in 30d

Description

Bug or feature request
  • Bug
  • Feature request
Description of feature (or steps to reproduce if bug)

SQLite3 3.38 of Feb 2022 has support for json extract -> not unlike Postgres and MySQL. This connector should be updated to use that if possible.

No data type change is needed -- it's still TEXT.

Expected result

I hope the final interface is the same as the Postgres connector. The PG example is:

Customer.find({
  where: {
    'address.state': 'California'
  },
  order: 'address.city'
})
Additional information (Node.js version, LoopBack version, etc)

Eh, doesn't really matter here. No code for this stuff present is no code for this stuff present.

It's also not like people use loopback with sqlite3 for super serious business things, so don't put the priority too high. It's just nice to make it capable of this JSON stuff so people can experiment on a minimal setup.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SQLite JSON1 documentation and the linked loopback-connector-postgresql commit. Trace how this connector handles nested JSON paths for the requested Customer where and order example, then verify that JSON extraction works while values remain TEXT.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, sqlite
Domain
database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.