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

Add JSON1 support #834

Open
augustorsouza opened this issue Aug 7, 2018 · 6 comments
Open

Add JSON1 support #834

augustorsouza opened this issue Aug 7, 2018 · 6 comments

Comments

@augustorsouza
Copy link

Hello,

I was thinking, the support to codable as Data is great, but if we could search and use the best of JSON data structure too?

This can be achieved by json1 sqlite3 extension (see https://github.com/SMAPPNYU/smapphowto/blob/master/howto_get_going_with_sqlite_json1.md and https://www.sqlite.org/json1.html)

Best regards

@Dkhusainov
Copy link

We also really need it.

@jberkel
Copy link
Collaborator

jberkel commented Sep 1, 2018

How could this look like? What feature do you expect from SQLite.swift?

@augustorsouza
Copy link
Author

The first step I think is to enable this sqlite feature. I am not an expert on these things, but I think it is necessary to change a config: https://github.com/CocoaPods/Specs/blob/master/Specs/d/c/2/sqlite3/3.24.0/sqlite3.podspec.json (look for -DSQLITE_ENABLE_JSON1=1.

Also, I think we might discuss good apis to create columns based on json and search inside these columns (a quick reference for what is possible: https://stackoverflow.com/a/33433552/451591)

Best regards :)

@jberkel
Copy link
Collaborator

jberkel commented Sep 1, 2018

Yes, you can build a JSON1 enabled version with pod 'sqlite3/json1'. Then from SQLite.swift use normal SQL queries which use the json features.

Some extra API wrapper for these could be useful but are not strictly necessary.

@Dkhusainov
Copy link

We only need it for raw sql. If this is achivable by only chanig Pod dependency config then it's great.

@adammj
Copy link

adammj commented Jul 10, 2019

Another vote for JSON1 (https://www.sqlite.org/json1.html) wrappers.

@jberkel jberkel changed the title [Feature Suggestion] JSON1 support Add JSON1 support Aug 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants