pack.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #include <yql/essentials/public/udf/udf_value.h>
  3. #include <util/generic/buffer.h>
  4. #include <util/generic/strbuf.h>
  5. #include <util/generic/vector.h>
  6. namespace NKikimr {
  7. namespace NMiniKQL {
  8. class TPgType;
  9. class TPagedBuffer;
  10. namespace NDetails {
  11. class TChunkedInputBuffer;
  12. }
  13. void PGPackImpl(bool stable, const TPgType* type, const NUdf::TUnboxedValuePod& value, TBuffer& buf);
  14. void PGPackImpl(bool stable, const TPgType* type, const NUdf::TUnboxedValuePod& value, TPagedBuffer& buf);
  15. NUdf::TUnboxedValue PGUnpackImpl(const TPgType* type, TStringBuf& buf);
  16. NUdf::TUnboxedValue PGUnpackImpl(const TPgType* type, NDetails::TChunkedInputBuffer& buf);
  17. void EncodePresortPGValue(TPgType* type, const NUdf::TUnboxedValue& value, TVector<ui8>& output);
  18. NUdf::TUnboxedValue DecodePresortPGValue(TPgType* type, TStringBuf& input, TVector<ui8>& buffer);
  19. ui64 PgValueSize(const NUdf::TUnboxedValuePod& value, i32 typeLen);
  20. ui64 PgValueSize(ui32 pgTypeId, const NUdf::TUnboxedValuePod& value);
  21. ui64 PgValueSize(const TPgType* type, const NUdf::TUnboxedValuePod& value);
  22. } // namespace NMiniKQL
  23. } // namespace NKikimr