import type * as core from '@prismamedia/graphql-platform'; import * as utils from '@prismamedia/graphql-platform-utils'; import type { MariaDBConnector, PoolConnection, SchemaFixOptions } from './index.js'; import { SchemaDiagnosis, type SchemaDiagnosisOptions } from './schema/diagnosis.js'; import { SchemaNamingStrategy, type SchemaNamingStrategyConfig } from './schema/naming-strategy.js'; import { Table } from './schema/table.js'; import { type CreateSchemaStatementConfig, type DropSchemaStatementConfig } from './statement.js'; export * from './schema/diagnosis.js'; export * from './schema/event.js'; export * from './schema/naming-strategy.js'; export * from './schema/table.js'; export interface SchemaConfig { /** * Optional, the schema's name * * Default: the pool's database name */ name?: utils.Nillable; /** * Optional, the schema's default charset * * Default: the connector's charset */ defaultCharset?: utils.Nillable; /** * Optional, the schema's default collation * * Default: the connector's collation */ defaultCollation?: utils.Nillable; /** * Optional, customize how the resources are named */ namingStrategy?: SchemaNamingStrategyConfig; /** * Optional, provide the default diagnosis's options */ diagnosis?: SchemaDiagnosisOptions; } export declare class Schema { readonly connector: MariaDBConnector; readonly config?: SchemaConfig; readonly configPath: utils.Path; readonly name: string; readonly comment?: string; readonly namingStrategy: SchemaNamingStrategy; readonly defaultCharset: string; readonly defaultCollation: string; readonly tablesByNode: ReadonlyMap; readonly tables: ReadonlyArray; constructor(connector: MariaDBConnector); toString(): string; getTableByNode(nodeOrName: core.Node | core.Node['name']): Table; drop(config?: DropSchemaStatementConfig, connection?: PoolConnection): Promise; create(config?: CreateSchemaStatementConfig, connection?: PoolConnection): Promise; diagnose(options?: SchemaDiagnosisOptions): Promise; fix(options?: utils.Thunkable): Promise; } //# sourceMappingURL=schema.d.ts.map