bun-mariadb/dist/lib/mariadb/db-schema-manager.d.ts

40 lines
1.1 KiB
TypeScript

#!/usr/bin/env bun
import type { BUN_MARIADB_DatabaseSchemaType } from "../../types";
declare class MariaDBSchemaManager {
private db_manager_table_name;
private recreate_vector_table;
private db_schema;
constructor({ schema, recreate_vector_table, }: {
schema: BUN_MARIADB_DatabaseSchemaType;
recreate_vector_table?: boolean;
});
syncSchema(): Promise<void>;
private getDatabaseName;
private quoteIdentifier;
private tableSchemaWhere;
private run;
private query;
private createDbManagerTable;
private insertDbManagerTable;
private removeDbManagerTable;
private getExistingTables;
private getLiveTableNames;
private dropRemovedTables;
private syncTable;
private resolveTable;
private createTable;
private buildTableOptions;
private updateTable;
private getTableColumns;
private addColumn;
private checkIfTableExists;
private recreateTable;
private insertRows;
private buildColumnDefinition;
private mapDataType;
private buildForeignKeyConstraint;
private syncIndexes;
close(): void;
}
export { MariaDBSchemaManager };