From 8103c26ca86ba97da98ad07a1f1ecbf1bbfb06ae Mon Sep 17 00:00:00 2001 From: "SPRINX0\\prochazka" Date: Fri, 7 Feb 2025 13:36:14 +0100 Subject: [PATCH] tiny db structure --- packages/types/dbinfo.d.ts | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/packages/types/dbinfo.d.ts b/packages/types/dbinfo.d.ts index 76157cbc8..e65ffae17 100644 --- a/packages/types/dbinfo.d.ts +++ b/packages/types/dbinfo.d.ts @@ -194,4 +194,31 @@ type DeepPartial = { [K in keyof T]?: T[K] extends object ? DeepPartial : T[K]; }; -export type DatabaseInfoPartial = DeepPartial; +export interface ColumnReferenceTiny { + n: string; // name + r?: string; // ref name +} + +export interface PrimaryKeyInfoTiny { + c: ColumnReferenceTiny[]; // columns +} + +export interface ForeignKeyInfoTiny { + c: ColumnReferenceTiny[]; // columns + r: string; // reference table name +} + +export interface ColumnInfoTiny { + n: string; // name + t: string; // type +} + +export interface TableInfoTiny { + n: string; //name + o: string; // comment + c: ColumnInfoTiny[]; // columns +} + +export interface DatabaseInfoTiny { + t: TableInfoTiny[]; // tables +}