UNPKG

gitdb-database

Version:

A production-ready CLI tool for managing a NoSQL database using GitHub repositories as storage

19 lines 653 B
export type IndexField = string; export type Index = Record<string, Record<string, string[]>>; /** * Build an in-memory index for the specified fields from a list of documents. */ export declare function buildIndex(docs: any[], fields: IndexField[]): Index; /** * Load persistent index from .gitdb/index.json */ export declare function loadIndex(path: string): Index; /** * Save index to .gitdb/index.json */ export declare function saveIndex(index: Index, path: string): void; /** * Query the index for fast lookups */ export declare function queryIndex(index: Index, field: string, value: string): string[]; //# sourceMappingURL=index.d.ts.map