/Users/deen/code/yugabyte-db/src/yb/yql/pggate/pg_callbacks.cc
Line | Count | Source (jump to first uncovered line) |
1 | | // Copyright (c) YugaByte, Inc. |
2 | | // |
3 | | // Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except |
4 | | // in compliance with the License. You may obtain a copy of the License at |
5 | | // |
6 | | // http://www.apache.org/licenses/LICENSE-2.0 |
7 | | // |
8 | | // Unless required by applicable law or agreed to in writing, software distributed under the License |
9 | | // is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express |
10 | | // or implied. See the License for the specific language governing permissions and limitations |
11 | | // under the License. |
12 | | |
13 | | #include "yb/yql/pggate/pg_callbacks.h" |
14 | | |
15 | | #include <string> |
16 | | |
17 | | #include "yb/util/logging.h" |
18 | | |
19 | | namespace yb { |
20 | | namespace pggate { |
21 | | |
22 | 0 | std::string GetDebugQueryString(const PgCallbacks& callbacks) { |
23 | 0 | DCHECK_ONLY_NOTNULL(callbacks.GetDebugQueryString); |
24 | 0 | const char* query_str = callbacks.GetDebugQueryString(); |
25 | 0 | if (query_str) { |
26 | 0 | return query_str; |
27 | 0 | } |
28 | 0 | return "No query"; |
29 | 0 | } |
30 | | |
31 | | } // namespace pggate |
32 | | } // namespace yb |