import { EastFunction, FromCsvFunction, FromCsvOptions, ToCsvFunction, ToCsvOptions, Utf8DecodeFunction, Utf8EncodeFunction, Variable } from '../functions'; import { ArrayType, BlobType, NonNullable, StringType, StructType } from '../types'; /** * Return a blob containing a CSV encoding of an array of structs. * * @param value the {@link Expression} with the value to encode as CSV * @param printers an object containing functions returning {@link Expression}s to print each field (e.g. to format a date-time) * @param options provide options for formatting the CSV files (such as delimeters, null sentinels, and headers) * * @category Expression * * @example * ```typescript * ToCsv( * array_of_structs, * { date: x => Print(x, "YYYY-MM-DD") }, * { nullString: "NA" } * ) * ``` */ export declare function ToCsv>(value: EastFunction, printers?: { [K in keyof T["value"]["value"]]?: (field: Variable>) => EastFunction; }, options?: Partial): ToCsvFunction; /** * Return a array of structs from data encoded in a CSV blob. * * @param type the {@link EastType} of the output to decode (column names should match the CSV file) * @param value the {@link Expression} with the blob value to decode from CSV * @param parsers an object containing functions returning {@link Expression}s to parse each field (e.g. to parse the format a date-time) * @param options provide options for formatting the CSV files (such as delimeters, null sentinels, and headers) * * @example * ```typescript * FromCsv( * ArrayType(StructType({ id: StringType, date: DateTimeType, qty: Nullable(IntegerType) })), * blob, * { date: x => Parse(x, "YYYY-MM-DD") }, * { nullString: "NA" } * ) * ``` * @category Expression */ export declare function FromCsv>(type: T, value: EastFunction, parsers?: { [K in keyof T["value"]["value"]]?: (field: Variable) => EastFunction>; }, options?: Partial): FromCsvFunction; /** * Return a blob containing a string encoded as a UTF8 bytestring. * * @param from the {@link EastFunction} of the string to encode * * @category Expression * * @example * ```typescript * // ... * Blob: Utf8Encode(string), * // ... * ``` */ export declare function Utf8Encode(from: EastFunction): Utf8EncodeFunction; /** * Return a blob containing a string encoded as a UTF8 bytestring. * * @param from the {@link EastFunction} of the string to encode * * @category Expression * * @example * ```typescript * // ... * String: Utf8Decode(blob), * // ... * ``` */ export declare function Utf8Decode(from: EastFunction): Utf8DecodeFunction;