vesoft-inc / nebula

A distributed, fast open-source graph database featuring horizontal scalability and high availability
https://nebula-graph.io
Apache License 2.0
10.65k stars 1.19k forks source link

Support byte[] in prop data type #5031

Open wey-gu opened 1 year ago

wey-gu commented 1 year ago

Is your feature request related to a problem? Please describe.

This will enable ease of prop data encryption in the application/application adaptor layer.

Describe the solution you'd like

as title

Describe alternatives you've considered

Treat byte as string or do base64 serialization, but not applicable to all use cases.

Additional context

https://community-chat.nebula-graph.io/t/8097858/got-question-is-there-any-plan-to-support-byte-data-in-nebul

cc @xtcyclist @wdroste @Shylock-Hg

wdroste commented 1 year ago

Most NoSQL/RDBMS systems support blob/byte[], the common use cases are either small attachments or encrypted fields. Generally encoding/decoding them to base64 is seen as inefficient as it makes the storage larger and adds to compute cycles.

So currently Nebula JDBC doesn’t support BLOB which is part of that specification as well. And from our perspective we’re trying to support compatibility with Neo4j which supports byte[] and it is used in our application.

Here are the types for JDBC https://docs.oracle.com/cd/E19830-01/819-4721/beajw/index.html

Here are the types for Neo4j https://neo4j.com/docs/api/java-driver/current/org.neo4j.driver/org/neo4j/driver/types/TypeSystem.html