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_update.h
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
#ifndef YB_YQL_PGGATE_PG_UPDATE_H_
16
#define YB_YQL_PGGATE_PG_UPDATE_H_
17
18
#include "yb/yql/pggate/pg_session.h"
19
#include "yb/yql/pggate/pg_dml_write.h"
20
21
namespace yb {
22
namespace pggate {
23
24
//--------------------------------------------------------------------------------------------------
25
// UPDATE
26
//--------------------------------------------------------------------------------------------------
27
28
class PgUpdate : public PgDmlWrite {
29
 public:
30
  PgUpdate(PgSession::ScopedRefPtr pg_session, const PgObjectId& table_id, bool is_single_row_txn)
31
704k
      : PgDmlWrite(std::move(pg_session), table_id, is_single_row_txn) {}
32
33
1.39M
  StmtOp stmt_op() const override { return StmtOp::STMT_UPDATE; }
34
35
 private:
36
704k
  PgsqlWriteRequestPB::PgsqlStmtType stmt_type() const override {
37
704k
    return PgsqlWriteRequestPB::PGSQL_UPDATE;
38
704k
  }
39
};
40
41
}  // namespace pggate
42
}  // namespace yb
43
44
#endif // YB_YQL_PGGATE_PG_UPDATE_H_