YugabyteDB (2.13.1.0-b60, 21121d69985fbf76aa6958d8f04a9bfa936293b5)

Coverage Report

Created: 2022-03-22 16:43

/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::YBSession;
30
using client::YBMetaDataCache;
31
32
// TODO(neil) This should be derived from a GFLAGS.
33
static MonoDelta kSessionTimeout = 60s;
34
35
//--------------------------------------------------------------------------------------------------
36
// Class PgStatement
37
//--------------------------------------------------------------------------------------------------
38
39
9.26M
PgStatement::PgStatement(PgSession::ScopedRefPtr pg_session) : pg_session_(std::move(pg_session)) {
40
9.26M
}
41
42
9.26M
PgStatement::~PgStatement() {
43
9.26M
}
44
45
57.2M
void PgStatement::AddExpr(PgExpr::SharedPtr expr) {
46
57.2M
  exprs_.push_back(expr);
47
57.2M
}
48
49
}  // namespace pggate
50
}  // namespace yb