func (db *DB) Put(ctx context.Context, docID string, doc interface{}) (rev string, err error) {
	i, err := normalizeFromJSON(doc)
	if err != nil {
		return "", err
	}
	return db.driverDB.Put(ctx, docID, i)
}
// Put creates a new doc or updates an existing one, with the specified docID.
// If the document already exists, the current revision must be included in doc,
// with JSON key '_rev', otherwise a conflict will occur. The new rev is
// returned.
//
// doc may be one of:
//
//  - An object to be marshaled to JSON. The resulting JSON structure must
//    conform to CouchDB standards.
//  - A []byte value, containing a valid JSON document
//  - A json.RawMessage value containing a valid JSON document
//  - An io.Reader, from which a valid JSON document may be read.
Put creates a new doc or updates an existing one, with the specified docID.
If the document already exists, the current revision must be included in doc,
with JSON key '_rev', otherwise a conflict will occur. The new rev is
returned.

doc may be one of.

- An object to be marshaled to JSON. The resulting JSON structure must
conform to CouchDB standards.
- A []byte value, containing a valid JSON document
- A json.RawMessage value containing a valid JSON document
- An io.Reader, from which a valid JSON document may be read.
// Put creates a new doc or updates an existing one with the specified docID . // If the document already exists the current revision must be included in doc // with JSON key ' _rev ' otherwise a conflict will occur . The new rev is // returned . // // doc may be one of : // // - An object to be marshaled to JSON . The resulting JSON structure must // conform to CouchDB standards . // - A [] byte value containing a valid JSON document // - A json . RawMessage value containing a valid JSON document // - An io . Reader from which a valid JSON document may be read .
func (db *DB) Put(ctx context.Context, docID string, doc interface{}) (rev string, err error) {
	i, err := normalizeFromJSON(doc)
	if err != nil {
		return "", err
	}
	return db.driverDB.Put(ctx, docID, i)
}
func ( db * DB ) Put ( ctx context . Context , docID string , doc interface { } ) ( rev string , err error ) { i , err := normalizeFromJSON ( doc ) if err != nil { return " " , err } return db . driverDB . Put ( ctx , docID , i ) }
Put creates a new doc or updates an existing one, with the specified docID.
Put creates a new doc or updates an existing one with the specified docID .