import { SQL } from 'drizzle-orm'; import { PodColumnBase, PodTable } from './schema'; import { SPARQLQuery } from './sparql/types'; import { SelectQueryPlan } from './select-plan'; import { QueryCondition } from './query-conditions'; import type { UriResolver } from './uri'; export type { SPARQLQuery }; interface SimpleSelectOperation { table: PodTable; where?: Record; limit?: number; offset?: number; orderBy?: Array<{ column: string; direction: 'asc' | 'desc'; }>; distinct?: boolean; } interface InsertPlanInput { table: PodTable; rows: Array>; } /** * Table registry context for URI resolution */ export interface TableRegistryContext { tableRegistry: Map; tableNameRegistry: Map; baseUri?: string; record?: Record; currentTable?: PodTable; } export declare class ASTToSPARQLConverter { private podUrl; private webId?; private selectBuilder; private updateBuilder; private expressionBuilder; private tableContext?; private uriResolver; private prefixes; constructor(podUrl: string, webId?: string | undefined, uriResolver?: UriResolver); /** * Set table registry for URI link resolution */ setTableRegistry(tableRegistry: Map, tableNameRegistry: Map, baseUri?: string): void; convertSelect(ast: Record, table: PodTable, targetGraph?: string, fromSources?: string[], allowGraphVariable?: boolean): SPARQLQuery; buildWhereClauseForCondition(whereAst: QueryCondition, table: PodTable): string; convertSelectPlan(plan: SelectQueryPlan, targetGraph?: string, fromSources?: string[], allowGraphVariable?: boolean): SPARQLQuery; convertSimpleSelect(operation: SimpleSelectOperation, targetGraph?: string, fromSources?: string[], allowGraphVariable?: boolean): SPARQLQuery; convertInsert(valuesOrPlan: Array> | InsertPlanInput, table?: PodTable, targetGraph?: string): SPARQLQuery; convertUpdate(setData: Record, whereConditions: QueryCondition | Record, table: PodTable, targetGraph?: string): SPARQLQuery; convertDelete(whereConditions: QueryCondition | Record, table: PodTable, targetGraph?: string): SPARQLQuery; getPrefixes(): Record; addPrefix(prefix: string, uri: string): void; getPredicateForColumnPublic(column: PodColumnBase | string | Record, table: PodTable): string; formatLiteralValue(value: unknown, column?: PodColumnBase | Record): string | string[]; generateSubjectUri(record: Record, table: PodTable): string; parseDrizzleAST(sql: SQL, _table?: PodTable): { type: 'select'; columns: '*'; where: Record; }; private parseWhereClause; } //# sourceMappingURL=ast-to-sparql.d.ts.map