git-documentdb
Version:
Offline-first database that syncs with Git
48 lines • 2.36 kB
TypeScript
/**
* GitDocumentDB
* Copyright (c) Hidekazu Kubota
*
* This source code is licensed under the Mozilla Public License Version 2.0
* found in the LICENSE file in the root directory of gitDDB source tree.
*/
import { GitDDBInterface } from '../types_gitddb';
import { Doc, FatDoc, GetInternalOptions, GetOptions, HistoryOptions, JsonDoc, SerializeFormat } from '../types';
/**
* Read json file from working directory.
* This is x10 faster than readBlob() from loose object,
* x100 faster than readBlob() from packed object.
*
* @throws {@link Err.DatabaseClosingError}
* @throws {@link Err.RepositoryNotOpenError}
* @throws {@link Err.InvalidJsonObjectError}
*/
export declare function getJsonDocFromWorkingDir(gitDDB: GitDDBInterface, shortName: string, collectionPath: string, serializeFormat: SerializeFormat): Promise<JsonDoc | undefined>;
/**
* Read text file from working directory.
* This is x10 faster than readBlob() from loose object,
* x100 faster than readBlob() from packed object.
*
* @throws {@link Err.DatabaseClosingError}
* @throws {@link Err.RepositoryNotOpenError}
* @throws {@link Err.InvalidJsonObjectError}
*/
export declare function getTextDocFromWorkingDir(gitDDB: GitDDBInterface, shortName: string, collectionPath: string, serializeFormat: SerializeFormat): Promise<string | undefined>;
/**
* Read binary file from working directory.
* This is x10 faster than readBlob() from loose object,
* x100 faster than readBlob() from packed object.
*
* @throws {@link Err.DatabaseClosingError}
* @throws {@link Err.RepositoryNotOpenError}
* @throws {@link Err.InvalidJsonObjectError}
*/
export declare function getBinaryDocFromWorkingDir(gitDDB: GitDDBInterface, shortName: string, collectionPath: string, serializeFormat: SerializeFormat): Promise<Uint8Array | undefined>;
/**
* Common implementation of get-like commands
*
* @throws {@link Err.DatabaseClosingError}
* @throws {@link Err.RepositoryNotOpenError}
* @throws {@link Err.InvalidJsonObjectError}
*/
export declare function getImpl(gitDDB: GitDDBInterface, shortName: string, collectionPath: string, serializeFormat: SerializeFormat, options?: GetOptions, internalOptions?: GetInternalOptions, historyOptions?: HistoryOptions): Promise<Doc | FatDoc | undefined>;
//# sourceMappingURL=get.d.ts.map