graphile-settings
Version:
graphile settings
30 lines (29 loc) • 1.43 kB
TypeScript
import type { I18nMeta, PgCodec, RealtimeMeta, SearchMeta, StorageMeta } from './types';
/**
* Detect storage metadata from a codec's smart tags.
* Storage tables are identified by @storageFiles and @storageBuckets smart tags.
*/
export declare function buildStorageMeta(codec: PgCodec): StorageMeta | null;
/**
* Detect search metadata from a codec's columns and smart tags.
*
* Looks for:
* - tsvector columns (full-text search)
* - vector columns (pgvector semantic search)
* - @searchConfig smart tag (per-table search configuration)
* - @bm25Index smart tag on columns (BM25 search)
* - @trgmSearch smart tag (trigram search)
*/
export declare function buildSearchMeta(codec: PgCodec, _build: unknown, inflectAttr: (attrName: string, codec: PgCodec) => string): SearchMeta | null;
/**
* Detect i18n metadata from a codec's @i18n smart tag.
* The @i18n tag value is the name of the translation table.
* Translatable fields are discovered by matching text/citext columns
* between the base table and the translation table codec.
*/
export declare function buildI18nMeta(codec: PgCodec, build: unknown, inflectAttr: (attrName: string, codec: PgCodec) => string): I18nMeta | null;
/**
* Detect realtime metadata from a codec's @realtime smart tag.
* Tables tagged with @realtime get subscription fields generated.
*/
export declare function buildRealtimeMeta(codec: PgCodec, build: unknown): RealtimeMeta | null;