Home > git-documentdb > GitDocumentDB > open
#
GitDocumentDB.open() methodOpen or create a Git repository
Signature:#
ParametersParameter | Type | Description |
---|---|---|
openOptions | OpenOptions |
Promise<DatabaseOpenResult >
#
RemarksCreate a new Git repository if a dbName specified in the constructor does not exist.
GitDocumentDB creates a legitimate Git repository and unique metadata under '.gitddb/'.
'.gitddb/' keeps DatabaseInfo for combining databases, checking schema and migration.
GitDocumentDB can also load a Git repository that is created by other apps. It almost works; however, correct behavior is not guaranteed if it does not have a valid '.gitddb/'.
#
ExceptionsErr.RepositoryNotFoundError may occurs when openOptions.createIfNotExists is false.
# Errors from _createRepository
# Errors from putWorker