bchavez / RethinkDb.Driver

:headphones: A NoSQL C#/.NET RethinkDB database driver with 100% ReQL API coverage.
http://rethinkdb.com/api/java
Other
383 stars 134 forks source link

Resolution function on OptArg insert conflict #142

Closed rgcejudo closed 5 years ago

rgcejudo commented 5 years ago

Hi!

How do you use OptArg function in order to implement a resolution function on insert conflict?

I think something similar to Java API:

// assume newMemos is a list of memo documents to insert r.table("memos").insert(new_memos).optArg("conflict", (id, old_doc, new_doc) -> new_doc.merge( r.hashMap(content, old_doc.g("content").add("\n") .add(new_doc.g("content"))) ) ).run(conn);

bchavez commented 5 years ago

Hey there,

If you need help using the driver, please have a look here: https://github.com/bchavez/RethinkDb.Driver#getting-help

and join and ask your question in Discord Server. GitHub issues here are reserved for changes to the source code.

Thanks, Brian