import { TGetOperationStatusResp, TGetResultSetMetadataResp } from '../../thrift/TCLIService_types'; import { OperationStatus } from '../contracts/OperationStatus'; import { ResultMetadata } from '../contracts/ResultMetadata'; /** * Synthesize a Thrift `TGetOperationStatusResp` from the neutral * `OperationStatus` DTO. Used by `DBSQLOperation.status()` when running * against a non-Thrift backend (e.g. kernel) so the public API stays Thrift-shaped. * * Carries the rich status fields when the backend supplies them * (`numModifiedRows`, `displayMessage`, `diagnosticInfo`, `errorDetailsJson`) * — the kernel backend reads these off the terminal kernel statement, so DML * operations report `numModifiedRows` at parity with the Thrift path. * `numModifiedRows` is re-boxed as a Thrift `Int64` (`node-int64`) to match the * wire shape the Thrift deserializer produces, so consumers can read it * uniformly across backends. * * Still lossy for Thrift-only fields not carried by `OperationStatus` * (`taskStatus`, `operationStarted`, `operationCompleted`), which are left * undefined. */ export declare function synthesizeThriftStatus(status: OperationStatus): TGetOperationStatusResp; /** * Synthesize a Thrift `TGetResultSetMetadataResp` from the neutral * `ResultMetadata` DTO. Used by `DBSQLOperation.getMetadata()` when running * against a non-Thrift backend. * * Lossy: `cacheLookupResult`, `uncompressedBytes`, `compressedBytes` are left * undefined; `status` is set to a synthetic OK. */ export declare function synthesizeThriftResultSetMetadata(metadata: ResultMetadata): TGetResultSetMetadataResp;