#pragma once #include #include #include #include namespace NSQLComplete { struct TSchemaDescribeCacheKey { TString Zone; TString Cluster; TString Path; friend bool operator==( const TSchemaDescribeCacheKey& lhs, const TSchemaDescribeCacheKey& rhs) = default; }; template <> struct TByteSize { size_t operator()(const TSchemaDescribeCacheKey& x) const noexcept { return sizeof(x) + TByteSize()(x.Zone) + TByteSize()(x.Cluster) + TByteSize()(x.Path); } }; template <> struct TByteSize { size_t operator()(const TFolderEntry& x) const noexcept { return sizeof(x) + TByteSize()(x.Type) + TByteSize()(x.Name); } }; template <> struct TByteSize { size_t operator()(const TTableDetails& x) const noexcept { return TByteSize>()(x.Columns); } }; } // namespace NSQLComplete template <> struct THash { inline size_t operator()(const NSQLComplete::TSchemaDescribeCacheKey& key) const { return THash>()( std::tie(key.Zone, key.Cluster, key.Path)); } };