arangodb / python-arango

The official ArangoDB Python driver.
https://docs.python-arango.com
MIT License
448 stars 75 forks source link

Batch upsert? #73

Closed wshayes closed 6 years ago

wshayes commented 6 years ago

I'm trying to figure out how to do an insert or replace using batch mode. Is that possible?

batch.collection(collection_name).insert(doc) # won't replace batch.collection(collection_name).replace(doc) # won't insert new doc

Is there something that will provide upsert functionality for batch?

joowani commented 6 years ago

Hi @wshayes,

Unfortunately none that I know of. It seems ArangoDB doesn't support upsert. So you will have to query first (with Collection.get_many for example).

wshayes commented 6 years ago

Thanks for checking and thank you for making this client. It is really nice and well designed.

joowani commented 6 years ago

Thank you for using it @wshayes!