UnQLite Users Forum

JX9 reading KV data?

append delete SRG

I want to store JSON data in a KV structure so I can retrieve it by name. I also want to be able to query the data in the JSON data so need to use JX9. All of the JX9 examples show reading from a specific DB (i.e. db_create() and db_store() taking a database name).

Can I use JX9 to read the value of a KV store?

Reply RSS


append delete #1. chm

Yes, you can read raw KV data from JX9 but you have to wrap unqlite_kv_fetch() inside a C foreign function and register it via unqlite_create_function() in order to call it from the Jx9 code.

Download some C/C++ samples from the downloads page to see how this could be done. http://unqlite.org/downloads.html


(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: chm_at_symisc, devel_at_symisc