#pragma once #include #include #include namespace NKikimr { namespace NMiniKQL { class TPgType; } // NMiniKQL } // NKikimr namespace NYql { namespace NResult { class TYsonResultWriter; } namespace NCommon { class TInputBuf; class TOutputBuf; TString PgValueToString(const NUdf::TUnboxedValuePod& value, ui32 pgTypeId); NUdf::TUnboxedValue PgValueFromString(const TStringBuf text, ui32 pgTypeId); TString PgValueToNativeText(const NUdf::TUnboxedValuePod& value, ui32 pgTypeId); NUdf::TUnboxedValue PgValueFromNativeText(const TStringBuf text, ui32 pgTypeId); TString PgValueToNativeBinary(const NUdf::TUnboxedValuePod& value, ui32 pgTypeId); NUdf::TUnboxedValue PgValueFromNativeBinary(const TStringBuf binary, ui32 pgTypeId); TString PgValueCoerce(const NUdf::TUnboxedValuePod& value, ui32 pgTypeId, i32 typMod, TMaybe* error); void WriteYsonValuePg(NResult::TYsonResultWriter& writer, const NUdf::TUnboxedValuePod& value, NKikimr::NMiniKQL::TPgType* type, const TVector* structPositions); void WriteYsonValueInTableFormatPg(TOutputBuf& buf, NKikimr::NMiniKQL::TPgType* type, const NKikimr::NUdf::TUnboxedValuePod& value, bool topLevel); NUdf::TUnboxedValue ReadYsonValueInTableFormatPg(NKikimr::NMiniKQL::TPgType* type, char cmd, TInputBuf& buf); NUdf::TUnboxedValue ReadYsonValuePg(NKikimr::NMiniKQL::TPgType* type, char cmd, TInputBuf& buf); void SkipSkiffPg(NKikimr::NMiniKQL::TPgType* type, TInputBuf& buf); NKikimr::NUdf::TUnboxedValue ReadSkiffPg(NKikimr::NMiniKQL::TPgType* type, TInputBuf& buf); void WriteSkiffPg(NKikimr::NMiniKQL::TPgType* type, const NKikimr::NUdf::TUnboxedValuePod& value, TOutputBuf& buf); extern "C" void ReadSkiffPgValue(NKikimr::NMiniKQL::TPgType* type, NKikimr::NUdf::TUnboxedValue& value, TInputBuf& buf); extern "C" void WriteSkiffPgValue(NKikimr::NMiniKQL::TPgType* type, const NKikimr::NUdf::TUnboxedValuePod& value, TOutputBuf& buf); } // namespace NCommon } // namespace NYql