Comments (6)
Hi,
you can perform an upsert only via AQL.
https://docs.arangodb.com/3.0/AQL/Operations/Upsert.html
Regards,
Mark
from arangodb-java-driver.
Hi Mark,
Thanks for your response. So can I use updateDocument for update and insert using the java API.
Regards,
Sajeev
from arangodb-java-driver.
With updateDocument
you can only update a document, if it doesn't exists you get an error.
With createDocument
you can only insert a document, if it exists already you get an error.
With executeAqlQuery
you can perform an AQL to upsert a document.
If you never worked with AQL before, check out our documentation: https://docs.arangodb.com/3.0/AQL/index.html
from arangodb-java-driver.
With executeAqlQuery you can perform an AQL to upsert a document.
For future searchers, this is called query
now. See https://github.com/arangodb/arangodb-java-driver/blob/master/docs/Drivers/Java/Reference/Database/Queries.md.
from arangodb-java-driver.
Is the upsert function available using java driver yet?
from arangodb-java-driver.
In addition you can also insertDocument
setting overwrite
in the provided DocumentCreateOptions
, which means:
* @param overwrite If set to true, the insert becomes a replace-insert. If a document with the same {@code _key}
* already exists the new document is not rejected with unique constraint violated but will replace
* the old document.
from arangodb-java-driver.
Related Issues (20)
- Please package with maven-bundle-plugin HOT 1
- Q: Default value HOT 5
- Why does you not throw ArangoDBException in HttpCommunication.java, the inserting action was failed but I cannot handle this event HOT 2
- InternalSerdeImpl does not serialize bindVars correctly HOT 2
- Version 7: How to ignore POJO fields for arangodb but serialize for outgoing as JSON with jackson HOT 4
- Interfering Jackson annotations HOT 2
- Arango query is flattening nested attributes HOT 3
- Exception thrown by cursor when query results > batch size (v6.18.0+) HOT 5
- "vertx-blocked-thread-checker" java.lang.OutOfMemoryError HOT 2
- ROUND_ROBIN fallback not working HOT 3
- Synchronous streaming batched cursor throws exception when attempting to close after last batch is consumed HOT 1
- [DE-55] Retry case of error 503(without 'x-arango-endpoint') HOT 1
- [question] maxConnections parameter for 7.x.x arango client greater than 1 HOT 2
- Cursor with multiple batches is closed twice HOT 2
- Dependency upgrade for vertx to 4.5.3 (CVE-2024-1023) HOT 1
- Slow performance for large datasets on 7.5.1 (via Spring Data 4.1.0) HOT 4
- returnNew not working with ArangoCollectionAsync.insertDocuments method HOT 2
- Graalvm native build error HOT 2
- [DE-535] Provide the capability to reuse an existing Vertx instance HOT 1
- Quarkus native: No JsonFactory found for content type: JSON HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arangodb-java-driver.