Skip to main content

c4db_createCollection

Function c4db_createCollection 

Source
pub unsafe extern "C" fn c4db_createCollection(
    db: *mut C4Database,
    spec: C4CollectionSpec,
    outError: *mut C4Error,
) -> *mut C4Collection
Expand description

Creates and returns an empty collection with the given name & scope. If the collection already exists, it just returns it. If the scope doesn’t exist, it is implicitly created. @note Be sure to read C4Collection Lifespan in c4Collection.h.