datasquirel/dist/package-shared/shell/createDbFromSchema/grab-required-database-schemas.d.ts
2025-12-27 16:06:23 +01:00

30 lines
1.2 KiB
TypeScript

import { DSQL_DatabaseSchemaType } from "../../types";
type Params = {
userId?: string | number | null;
dbId?: string | number;
dbSlug?: string;
};
/**
* # Grab Database Schemas related to a database
* @param params
* @returns
*/
export default function grabRequiredDatabaseSchemas(params: Params): DSQL_DatabaseSchemaType[] | undefined;
export declare function grabPrimaryRequiredDbSchema({ userId, dbId, dbSlug }: Params): DSQL_DatabaseSchemaType | undefined;
export declare function findDbNameInSchemaDir({ userId, dbName, }: {
userId?: string | number;
dbName?: string;
}): DSQL_DatabaseSchemaType | undefined;
type UpdateDbSchemaParam = {
dbSchema: DSQL_DatabaseSchemaType;
userId?: string | number | null;
};
export declare function writeUpdatedDbSchema({ dbSchema, userId, }: UpdateDbSchemaParam): {
success?: boolean;
dbSchemaId?: string | number;
};
export declare function deleteDbSchema({ dbSchema, userId }: UpdateDbSchemaParam): void;
export declare function findTargetDbSchemaFromMainSchema(schemas: DSQL_DatabaseSchemaType[], dbFullName?: string, dbId?: string | number): DSQL_DatabaseSchemaType | undefined;
export declare function grabLatestDbSchemaID(userSchemaDir: string): number;
export {};