diff options
| author | vvvv <[email protected]> | 2024-11-06 23:54:28 +0300 |
|---|---|---|
| committer | vvvv <[email protected]> | 2024-11-07 00:04:25 +0300 |
| commit | cf2a23963ac10add28c50cc114fbf48953eca5aa (patch) | |
| tree | 174b849b8ecfa96b0c8e4409ab3287721a9210c8 /yql/essentials/parser/pg_wrapper/interface/pack.h | |
| parent | 3a3113a2bf5a7fab32bde414932082b264c559fc (diff) | |
Prepare move yql/minikql YQL-19206
types,jsonpath,dom
commit_hash:6b54be5968b6a30b6d97fe3a1611574bcefc749e
Diffstat (limited to 'yql/essentials/parser/pg_wrapper/interface/pack.h')
| -rw-r--r-- | yql/essentials/parser/pg_wrapper/interface/pack.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/yql/essentials/parser/pg_wrapper/interface/pack.h b/yql/essentials/parser/pg_wrapper/interface/pack.h new file mode 100644 index 00000000000..281f8139c48 --- /dev/null +++ b/yql/essentials/parser/pg_wrapper/interface/pack.h @@ -0,0 +1,32 @@ +#pragma once + +#include <yql/essentials/public/udf/udf_value.h> + +#include <util/generic/buffer.h> +#include <util/generic/strbuf.h> +#include <util/generic/vector.h> + +namespace NKikimr { +namespace NMiniKQL { + +class TPgType; +class TPagedBuffer; +namespace NDetails { +class TChunkedInputBuffer; +} + +void PGPackImpl(bool stable, const TPgType* type, const NUdf::TUnboxedValuePod& value, TBuffer& buf); +void PGPackImpl(bool stable, const TPgType* type, const NUdf::TUnboxedValuePod& value, TPagedBuffer& buf); + +NUdf::TUnboxedValue PGUnpackImpl(const TPgType* type, TStringBuf& buf); +NUdf::TUnboxedValue PGUnpackImpl(const TPgType* type, NDetails::TChunkedInputBuffer& buf); + +void EncodePresortPGValue(TPgType* type, const NUdf::TUnboxedValue& value, TVector<ui8>& output); +NUdf::TUnboxedValue DecodePresortPGValue(TPgType* type, TStringBuf& input, TVector<ui8>& buffer); + +ui64 PgValueSize(const NUdf::TUnboxedValuePod& value, i32 typeLen); +ui64 PgValueSize(ui32 pgTypeId, const NUdf::TUnboxedValuePod& value); +ui64 PgValueSize(const TPgType* type, const NUdf::TUnboxedValuePod& value); + +} // namespace NMiniKQL +} // namespace NKikimr |
