blob: 7114791c087a5c52145473794bf13e6afd6ac599 (
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 <yql/essentials/sql/v1/ide/completion/name/object/schema.h>
namespace NSQLComplete {
struct TSplittedPath {
TStringBuf Path;
TStringBuf NameHint;
};
struct TTableDetails {
TVector<TString> Columns;
};
class ISimpleSchema: public TThrRefBase {
public:
using TPtr = TIntrusivePtr<ISimpleSchema>;
~ISimpleSchema() override = default;
virtual TSplittedPath Split(TStringBuf path) const = 0;
// TODO(YQL-19747): Deprecated, use List(cluster, folder) instead.
virtual NThreading::TFuture<TVector<TFolderEntry>> List(TString folder) const;
virtual NThreading::TFuture<TVector<TFolderEntry>>
List(TString cluster, TString folder) const;
virtual NThreading::TFuture<TMaybe<TTableDetails>>
DescribeTable(const TString& cluster, const TString& path) const;
};
ISchema::TPtr MakeSimpleSchema(ISimpleSchema::TPtr simple);
} // namespace NSQLComplete
|