@proofkit/fmodata
Version:
FileMaker OData API client
26 lines (25 loc) • 1.15 kB
TypeScript
import { InternalLogger } from '../../logger.js';
import { Column } from '../../orm/column.js';
/**
* Utility function for processing select() calls.
* Used by both QueryBuilder and RecordBuilder to eliminate duplication.
*
* @param fields - Field names or Column references
* @returns Object with selectedFields array
*/
export declare function processSelectFields(...fields: (string | Column<any, any, string>)[]): {
selectedFields: string[];
};
/**
* Processes select() calls with field renaming support.
* Validates columns belong to the correct table and builds field mapping for renamed fields.
* Used by both QueryBuilder and RecordBuilder to eliminate duplication.
*
* @param fields - Object mapping output keys to column references
* @param tableName - Expected table name for validation
* @returns Object with selectedFields array and fieldMapping for renamed fields
*/
export declare function processSelectWithRenames<TTableName extends string>(fields: Record<string, Column<any, any, TTableName>>, tableName: string, logger: InternalLogger): {
selectedFields: string[];
fieldMapping: Record<string, string>;
};