summaryrefslogtreecommitdiffstats
path: root/ydb/public/sdk/cpp/client/ydb_table/impl/data_query.h
blob: c6d4a5b643c81df066c3d0e78231c5e0cc035479 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once

#include <ydb/public/sdk/cpp/client/ydb_table/table.h> 
#include <ydb/public/api/protos/ydb_table.pb.h> 

namespace NYdb {
namespace NTable {

TString EncodeQuery(const TString& text, bool reversible);

////////////////////////////////////////////////////////////////////////////////

class TDataQuery::TImpl {
    friend class TDataQuery;

public:
    TImpl(const TSession& session, const TString& text, bool keepText, const TString& id, bool allowMigration);

    TImpl(const TSession& session, const TString& text, bool keepText, const TString& id, bool allowMigration,
        const ::google::protobuf::Map<TString, Ydb::Type>& types);

    const TString& GetId() const;
    const ::google::protobuf::Map<TString, Ydb::Type>& GetParameterTypes() const;
    const TString& GetTextHash() const;
    const TMaybe<TString>& GetText() const;

private:
    NTable::TSession Session_;
    TString Id_;
    ::google::protobuf::Map<TString, Ydb::Type> ParameterTypes_;
    TString TextHash_;
    TMaybe<TString> Text_;
};

} // namespace NTable
} // namespace NYdb