blob: 2ed82752a01c85a3b4d25510aab32aa7fc299503 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#include "parse_tree.h"
#include <util/system/yassert.h>
#include <util/generic/maybe.h>
namespace NSQLComplete {
TMaybe<std::string> GetId(SQLv1::Bind_parameterContext* ctx) {
if (auto* x = ctx->an_id_or_type()) {
return x->getText();
} else if (auto* x = ctx->TOKEN_TRUE()) {
return x->getText();
} else if (auto* x = ctx->TOKEN_FALSE()) {
return x->getText();
} else {
return Nothing();
}
}
} // namespace NSQLComplete
|