nosql-constraints
Version:
Helpers to manage constrants (i.e. cascade delete) in a NoSQL database
36 lines • 751 B
TypeScript
/**
* Examples of how referencing properties could be named
* {
* portfolioId: '123',
* },
* {
* accountIds: ['123', '456'],
* },
* {
* account: {
* accountId: '123',
* },
* }
* {
* accounts: [
* {
* accountId: '123',
* },
* {
* accountId: '456',
* }
* ]
* },
*/
type DocumentSchemaChunkType = 'object' | 'array' | 'string' | 'number' | 'boolean' | 'null' | 'literal';
export type DocumentSchemaChunk = {
path: string | undefined;
type: DocumentSchemaChunkType;
value?: unknown;
properties?: Record<string, DocumentSchemaChunk[]>;
};
export interface DocumentSchemaAdapter {
extractChunks(): DocumentSchemaChunk[];
}
export {};
//# sourceMappingURL=schema.d.ts.map