Skip to content
This repository has been archived by the owner on Nov 22, 2018. It is now read-only.

Do you have plans to add new types eg JSON? #181

Open
DeadNumbers opened this issue Jun 1, 2017 · 7 comments
Open

Do you have plans to add new types eg JSON? #181

DeadNumbers opened this issue Jun 1, 2017 · 7 comments

Comments

@DeadNumbers
Copy link

No description provided.

@cznic cznic added the question label Jun 1, 2017
@cznic
Copy link
Owner

cznic commented Jun 1, 2017

In a sense, JSON is just a string/blob. What should adding type JSON provide?

@DeadNumbers
Copy link
Author

@cznic I mean equal Postgres json, where support query example select * from test where data @> '{"a":$1}';

@cznic
Copy link
Owner

cznic commented Jun 1, 2017

That looks like a lot of work. Suitable PRs will be accepted.

@awildeep
Copy link

What about leveraging v8 to help support JSON parsing?

@cznic
Copy link
Owner

cznic commented Sep 21, 2018

I believe a JSON parser is the easy and small part of this issue.

@cznic
Copy link
Owner

cznic commented Sep 21, 2018

If someone else can write the other necessary gears, which I have no idea about, I think I can prototype a JSON parser in maybe a day or so.

@cryptix
Copy link
Collaborator

cryptix commented Sep 21, 2018

correct me if I'm wrong but in postgres it's nice to have this on the query-language level because you reduce the amount of context switching between database and application layer (i.e. don't have to filter the results with application code). Is this also the case for embedded databases? Here it seems to be just a question of cleaner processing seperaration.

I only did a quick search but these to packages seem to do some of the lifting. So I think this + marshaling as a blob get's you quite far already without this having to be supported by the DB layer.

https://github.com/elgs/jsonql
https://github.com/tidwall/gjson

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants