UNPKG

@directus/api

Version:

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

15 lines (14 loc) 894 B
import type { Knex } from 'knex'; import { SchemaHelper, type CreateIndexOptions, type SortRecord, type Sql } from '../types.js'; export declare class SchemaHelperMSSQL extends SchemaHelper { generateIndexName(type: 'unique' | 'foreign' | 'index', collection: string, fields: string | string[]): string; applyLimit(rootQuery: Knex.QueryBuilder, limit: number): void; applyOffset(rootQuery: Knex.QueryBuilder, offset: number): void; formatUUID(uuid: string): string; getDatabaseSize(): Promise<number | null>; prepQueryParams(queryParams: Sql): Sql; addInnerSortFieldsToGroupBy(groupByFields: (string | Knex.Raw)[], sortRecords: SortRecord[], _hasRelationalSort: boolean): void; getColumnNameMaxLength(): number; getTableNameMaxLength(): number; createIndex(collection: string, field: string, options?: CreateIndexOptions): Promise<Knex.SchemaBuilder>; }