coronabytes / dotnet-arangodb

.NET Driver for ArangoDB
Apache License 2.0
66 stars 18 forks source link

Do these interfaces need to follow arangodb-java-driver? #3

Closed ChironShi closed 4 years ago

ChironShi commented 4 years ago

Do these interfaces need to follow arangodb-java-driver?

coronabytes commented 4 years ago

Don't quite understand the question. I COULD follow those interfaces, I just didn't want to - never even looked at the java driver just the HTTP documentation.

For V2 it WOULD make sense to split interfaces for graph, docs, management etc.

ChironShi commented 4 years ago

Just follow usage.

Examples: ArangoDB arango = new ArangoDB.Builder().build(); ArangoDatabase db = arango.db("myDB"); ArangoCollection collection = db.collection("some-collection"); BaseDocument document = new BaseDocument(); collection.insertDocument(document, new DocumentCreateOptions());

options: DocumentCreateOptions

waitForSync: Boolean Wait until document has been synced to disk.

returnNew: Boolean Return additionally the complete new document under the attribute new in the result.

returnOld: Boolean This options requires ArangoDB version 3.4.0 or higher. Additionally return the complete old document under the attribute old in the result. Only available if the overwrite option is used.

overwrite: Boolean This options requires ArangoDB version 3.4.0 or higher. If set to true, the insert becomes a replace-insert. If a document with the same _key already exists the new document is not rejected with unique constraint violated but will replace the old document.

silent: Boolean If set to true, an empty object will be returned as response. No meta-data will be returned for the created document. This option can be used to save some network traffic.

streamTransactionId: String If set, the operation will be executed within the transaction

Docs: https://www.arangodb.com/docs/stable/drivers/java-reference-collection-document-manipulation.html#arangocollectionupdatedocument