Can I do transactions and locks in CouchDB?

前端 未结 7 1949
难免孤独
难免孤独 2020-11-29 15:40

I need to do transactions (begin, commit or rollback), locks (select for update). How can I do it in a document model db?

Edit:

The case is this:

    <
7条回答
  •  伪装坚强ぢ
    2020-11-29 15:53

    Just use SQlite kind of lightweight solution for transactions, and when the transaction is completed successfully replicate it, and mark it replicated in SQLite

    SQLite table

    txn_id    , txn_attribute1, txn_attribute2,......,txn_status
    dhwdhwu$sg1   x                    y               added/replicated
    

    You can also delete the transactions which are replicated successfully.

提交回复
热议问题