[−][src]Function ejdb_sys::ejdbsavebson2
pub unsafe extern "C" fn ejdbsavebson2(
jcoll: *mut EJCOLL,
bs: *mut bson,
oid: *mut bson_oid_t,
merge: bool
) -> bool
Persist BSON object in the collection.
If saved bson does't have _id primary key then oid
will be set to generated bson _id,
otherwise oid
will be set to the current bson's _id field.
NOTE: Field names of passed bs
object may not contain $
and .
characters,
error condition will be fired in this case.
@param coll JSON collection handle. @param bs BSON object id pointer. @param oid OID pointer will be set to object's _id @param merge If true the merge will be performend with old and new objects. Otherwise old object will be replaced. @return If successful return true, otherwise return false.