Home > git-documentdb > GitDocumentDB > insertFatDoc
#
GitDocumentDB.insertFatDoc() methodInsert a data
Signature:#
ParametersParameter | Type | Description |
---|---|---|
name | string | undefined | null | name is a file path. |
doc | JsonDoc | string | Uint8Array | |
options | PutOptions |
Promise<PutResult >
#
RemarksThrows SameIdExistsError when data that has the same _id exists. It might be better to use put() instead of insert().
The saved file path is
${GitDocumentDB#workingDir}/${name}extension
.If a name parameter is undefined, it is automatically generated.
_id property of a JsonDoc is automatically set or overwritten by name parameter whose extension is omitted.
This is an alias of GitDocumentDB#rootCollection.insertFatDoc()
#
Exceptions# Errors from validateDocument, validateId
# Errors from putWorker