Skip to content

Commit

Permalink
chore: now push to remote
Browse files Browse the repository at this point in the history
  • Loading branch information
mabels committed Dec 10, 2024
1 parent d8052f1 commit 17230fe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ git clone $(pwd)/.git -b docs ./dist/fireproof-docs
(cd ./dist/fireproof-docs && git rm -rf docs)
mkdir -p dist/fireproof-docs/docs
npx typedoc --out dist/fireproof-docs/docs src/database.ts
(cd ./dist/fireproof-docs && git add `find docs -print` && git status && git commit -am "build from ${GIT}" && git push)
cp .git/config ./dist/fireproof-docs/.git/
(cd ./dist/fireproof-docs && git add `find docs -print` && git status && git commit -am "build from ${GIT}" && git push origin docs)

11 changes: 8 additions & 3 deletions src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export class Database<DT extends DocTypes = NonNullable<unknown>> implements Con
readonly _writeQueue: WriteQueue<DT>;
readonly blockstore: BaseBlockstore;

/*
/**
* Close the database and release resources
*/
async close() {
Expand All @@ -50,7 +50,7 @@ export class Database<DT extends DocTypes = NonNullable<unknown>> implements Con
await this.blockstore.close();
}

/*
/**
* Destroy the database and release all resources
*/
async destroy() {
Expand Down Expand Up @@ -87,7 +87,7 @@ export class Database<DT extends DocTypes = NonNullable<unknown>> implements Con
});
}

/*
/**
* Get a document from the database
* @param id - the document id
* @returns the document with the _id
Expand All @@ -106,6 +106,11 @@ export class Database<DT extends DocTypes = NonNullable<unknown>> implements Con
return { ...(doc as unknown as DocWithId<T>), _id: id };
}

/**
* Put a document from the database
* @param doc - the document to put
* @returns add DocResponse with the id and clock
*/
async put<T extends DocTypes>(doc: DocSet<T>): Promise<DocResponse> {
await this.ready();
this.logger.Debug().Str("id", doc._id).Msg("put");
Expand Down

0 comments on commit 17230fe

Please sign in to comment.