UNPKG

@proofkit/fmodata

Version:

FileMaker OData API client

19 lines (18 loc) 977 B
import { FMTable } from '../../orm/table.js'; /** * Determines if a field name needs to be quoted in OData queries. * Per FileMaker docs: field names with special characters (spaces, underscores, etc.) must be quoted. * Also quotes "id" case-insensitively as it's an OData reserved word. * Entity IDs (FMFID:*, FMTID:*) are not quoted as they're identifiers, not field names. * * @param fieldName - The field name or identifier to check * @returns true if the field name should be quoted in OData queries */ export declare function needsFieldQuoting(fieldName: string): boolean; /** * Formats select fields for use in OData query strings. * - Transforms field names to FMFIDs if using entity IDs * - Wraps "id" fields in double quotes (OData reserved) * - URL-encodes special characters but preserves spaces */ export declare function formatSelectFields(select: string[] | readonly string[] | undefined, table?: FMTable<any, any>, useEntityIds?: boolean): string;