/Users/deen/code/yugabyte-db/src/yb/yql/pggate/pg_statement.cc
Line | Count | Source |
1 | | //-------------------------------------------------------------------------------------------------- |
2 | | // Copyright (c) YugaByte, Inc. |
3 | | // |
4 | | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
5 | | // in compliance with the License. You may obtain a copy of the License at |
6 | | // |
7 | | // http://www.apache.org/licenses/LICENSE-2.0 |
8 | | // |
9 | | // Unless required by applicable law or agreed to in writing, software distributed under the License |
10 | | // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
11 | | // or implied. See the License for the specific language governing permissions and limitations |
12 | | // under the License. |
13 | | // |
14 | | //-------------------------------------------------------------------------------------------------- |
15 | | |
16 | | #include "yb/yql/pggate/pg_statement.h" |
17 | | |
18 | | #include "yb/client/yb_op.h" |
19 | | |
20 | | namespace yb { |
21 | | namespace pggate { |
22 | | |
23 | | using std::make_shared; |
24 | | using std::shared_ptr; |
25 | | using std::string; |
26 | | using std::vector; |
27 | | using namespace std::literals; // NOLINT |
28 | | |
29 | | using client::YBClient; |
30 | | using client::YBSession; |
31 | | using client::YBMetaDataCache; |
32 | | |
33 | | // TODO(neil) This should be derived from a GFLAGS. |
34 | | static MonoDelta kSessionTimeout = 60s; |
35 | | |
36 | | //-------------------------------------------------------------------------------------------------- |
37 | | // Class PgStatement |
38 | | //-------------------------------------------------------------------------------------------------- |
39 | | |
40 | 2.84M | PgStatement::PgStatement(PgSession::ScopedRefPtr pg_session) : pg_session_(std::move(pg_session)) { |
41 | 2.84M | } |
42 | | |
43 | 2.84M | PgStatement::~PgStatement() { |
44 | 2.84M | } |
45 | | |
46 | 18.8M | void PgStatement::AddExpr(PgExpr::SharedPtr expr) { |
47 | 18.8M | exprs_.push_back(expr); |
48 | 18.8M | } |
49 | | |
50 | | } // namespace pggate |
51 | | } // namespace yb |