@wxn0brp/db
Version:
A simple file-based database management system with support for CRUD operations, custom queries, and graph structures.
29 lines (28 loc) • 722 B
TypeScript
import { DbFindOpts } from "./options.js";
import { ValtheraCompatible } from "./valthera.js";
export declare namespace RelationTypes {
type Path = [string, string];
type FieldPath = string[];
interface DBS {
[key: string]: ValtheraCompatible;
}
interface Relation {
[key: string]: RelationConfig;
}
interface RelationConfig {
path: Path;
pk?: string;
fk?: string;
as?: string;
select?: string[];
findOpts?: DbFindOpts;
type?: "1" | "11" | "1n" | "nm";
relations?: Relation;
through?: {
table: string;
db?: string;
pk: string;
fk: string;
};
}
}