UNPKG

@sqb/connect

Version:

Multi-dialect database connection framework written with TypeScript

10 lines (9 loc) 955 B
import { Maybe } from 'ts-gems'; import { Adapter } from './adapter.js'; import { FieldInfoMap } from './field-info-map.js'; import { ArrayRowset, FieldNaming, ObjectRowset, QueryRequest } from './types.js'; export declare function applyNamingStrategy(value: string, namingStrategy?: FieldNaming): Maybe<string>; export declare function wrapAdapterFields(oldFields: Adapter.Field[], fieldNaming?: FieldNaming): FieldInfoMap; export declare function normalizeRowsToObjectRows(fields: FieldInfoMap, rowType: 'array' | 'object', oldRows: ObjectRowset | ArrayRowset, options?: Pick<QueryRequest, 'ignoreNulls' | 'transform'>): Record<string, any>[]; export declare function normalizeRowsToArrayRows(fields: FieldInfoMap, rowType: 'array' | 'object', oldRows: ObjectRowset | ArrayRowset, options?: Pick<QueryRequest, 'ignoreNulls' | 'transform'>): any[][]; export declare function callFetchHooks(rows: ObjectRowset | ArrayRowset, request: QueryRequest): void;