tugraph-db
tugraph-db copied to clipboard
[Feature] Support complex parameter type in Cypher API
Is your feature request related to a problem? Please describe.
No.
Describe the solution you'd like
Right now in Cypher API, we can not pass into a complex parameter type like an object with embedded data.
But this is very useful to update data with online API like I can send thousands records into a Cypher query as a parameter list and then do some query or update work with Cypher with UNWIND
. But now I can not put lots of data in the parameter so I need to:
- Export data from online service to file with CSV format and import data by CLI tools.
- Write a plugin myself to update data in the plugin with procedure API.
Both ways above are not quite convenient for developers to handle data with online service.
Describe alternatives you've considered
If we can not support complex parameter type in Cypher API, maybe we can provide some official plugins to do some common work like update vertex/edge by batch.
In Cypher, "db.importor.dataImportor" can also do batch append.
Batch update using more "standard" Cypher is a important enhancement interface, we will put it in schedule.
@knightast It is good to know about db.importer.dataImportor
function, but still I can not find any detailed documentation about how to use it. I will try to find some examples in the UT first.
I can not find any example about how to use this function in the docs nor in the unit tests. So could you give a simple example about how to use it?
Maybe you can refer the client implementation first, we will makeup the example. https://github.com/TuGraph-family/tugraph-db/blob/master/src/client/cpp/rpc/lgraph_rpc_client.cpp#L308