def put(doc, args = {})
      doc_id  = args[:doc_id]
      doc_rev = args[:doc_rev]
      options = args[:options]

      as_opal_promise(`#{@native}.put(#{doc.to_n}, doc_id, doc_rev, #{options.to_n})`)
    end
def put(doc, args = {})
      doc_id  = args[:doc_id]
      doc_rev = args[:doc_rev]
      options = args[:options]

      as_opal_promise(`#{@native}.put(#{doc.to_n}, doc_id, doc_rev, #{options.to_n})`)
    end
Creates or updates a document. When updating a document, its _id and _rev
 can either be in `doc` or passed explicitly as :doc_id and :doc_rev.

 @param doc [Hash] The contents to create or update
 @param args [Hash] Optional arguments
 @option args [String] :doc_id A document's id (requires :doc_rev)
 @option args [String] :doc_rev A document's rev (requires :id)
 @option args [Hash] :options Extra options (refer to the official doc)
 @return [Promise<Hash>]