UNPKG

@directus/api

Version:

Directus is a real-time API and App dashboard for managing SQL database content

10 lines (9 loc) 665 B
import type { Knex } from 'knex'; import { type CreateIndexOptions, SchemaHelper, type SortRecord } from '../types.js'; export declare class SchemaHelperMySQL extends SchemaHelper { generateIndexName(type: 'unique' | 'foreign' | 'index', collection: string, fields: string | string[]): string; changePrimaryKey(table: string, to: string | string[]): Promise<void>; getDatabaseSize(): Promise<number | null>; addInnerSortFieldsToGroupBy(groupByFields: (string | Knex.Raw)[], sortRecords: SortRecord[], hasRelationalSort: boolean): void; createIndex(collection: string, field: string, options?: CreateIndexOptions): Promise<Knex.SchemaBuilder>; }