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

JSON support on SQLite backend #116

Open
valderman opened this issue May 8, 2019 · 5 comments
Open

JSON support on SQLite backend #116

valderman opened this issue May 8, 2019 · 5 comments
Labels
enhancement Issue suggests new or improved functionality. good first issue Issues with this label should be relatively easy for new contributors to tackle. help wanted Issue could use some help.
Milestone

Comments

@valderman
Copy link
Owner

This seems like it could be easily done using json1. This could be done either as a flagged (off by default) module in selda-sqlite or as a separate selda-sqlite-json1 package.

The reason for not including the functionality in selda-sqlite by default is to avoid pulling in aeson's massive list of dependencies when they're not needed.

@valderman valderman added enhancement Issue suggests new or improved functionality. good first issue Issues with this label should be relatively easy for new contributors to tackle. help wanted Issue could use some help. labels May 8, 2019
@valderman valderman added this to the 0.5 milestone Aug 12, 2019
@valderman valderman modified the milestones: 0.5, 0.6 Sep 21, 2019
@herberteuler
Copy link

I'd like to work on this. I'm going to add a flag json if that's okay.

@valderman
Copy link
Owner Author

Sounds great! I'll be happy to merge it!

@herberteuler
Copy link

Development happens here. I'll create a pull request when I finish.

@herberteuler
Copy link

herberteuler commented Mar 9, 2022

An update: The json_extract function was causing troubles because it did not preserve JSON types in its results. However, SQLite >= 3.38.0 introduces the -> and ->> operators, which strive to be compatible with the PostgreSQL operators -> and ->>. I am currently working on trying these operators out.

@herberteuler
Copy link

herberteuler commented Mar 10, 2022

Okay, with the newest SQLite 3.38.0, and a similar implementation to that of selda-postgresql, the build on my personal branch passes all of the tests. But I am not yet able to produce a pull request. Things to cover before that:

  1. Wait and see how an issue would be resolved, which is blocking the upgrade of direct-sqlite's SQLite version.
  2. Upgrade direct-sqlite's embedded SQLite version to 3.38.0. I have forked a repository, and will create a pull request for that as soon as the above issue is resolved.
  3. Tidy the changes on my branch, and finally create a pull request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue suggests new or improved functionality. good first issue Issues with this label should be relatively easy for new contributors to tackle. help wanted Issue could use some help.
Projects
None yet
Development

No branches or pull requests

2 participants