tugraph-db icon indicating copy to clipboard operation
tugraph-db copied to clipboard

[Feature] Support complex parameter type in Cypher API

Open frank-zsy opened this issue 1 year ago • 4 comments

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.

frank-zsy avatar Mar 24 '23 02:03 frank-zsy

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 avatar Mar 28 '23 02:03 knightast

@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.

frank-zsy avatar Mar 28 '23 03:03 frank-zsy

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?

frank-zsy avatar Mar 28 '23 04:03 frank-zsy

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

knightast avatar Mar 28 '23 07:03 knightast