/Users/deen/code/yugabyte-db/src/yb/yql/cql/ql/ptree/pt_type.h
Line | Count | Source (jump to first uncovered line) |
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 | | // Tree node definitions for datatypes. |
16 | | //-------------------------------------------------------------------------------------------------- |
17 | | |
18 | | #ifndef YB_YQL_CQL_QL_PTREE_PT_TYPE_H_ |
19 | | #define YB_YQL_CQL_QL_PTREE_PT_TYPE_H_ |
20 | | |
21 | | #include "yb/client/schema.h" |
22 | | |
23 | | #include "yb/common/ql_type.h" |
24 | | |
25 | | #include "yb/yql/cql/ql/ptree/pt_name.h" |
26 | | #include "yb/yql/cql/ql/ptree/tree_node.h" |
27 | | |
28 | | namespace yb { |
29 | | namespace ql { |
30 | | |
31 | | class PTBaseType : public TreeNode { |
32 | | public: |
33 | | //------------------------------------------------------------------------------------------------ |
34 | | // Public types. |
35 | | typedef MCSharedPtr<PTBaseType> SharedPtr; |
36 | | typedef MCSharedPtr<const PTBaseType> SharedPtrConst; |
37 | | |
38 | | //------------------------------------------------------------------------------------------------ |
39 | | // Constructor and destructor. |
40 | | explicit PTBaseType(MemoryContext *memctx = nullptr, YBLocationPtr loc = nullptr) |
41 | 6.08k | : TreeNode(memctx, loc) { |
42 | 6.08k | } |
43 | 5.54k | virtual ~PTBaseType() { |
44 | 5.54k | } |
45 | | |
46 | 5.48k | virtual CHECKED_STATUS Analyze(SemContext *sem_context) { |
47 | 5.48k | return Status::OK(); |
48 | 5.48k | } |
49 | | |
50 | 0 | virtual bool IsApplicableForPrimaryKey() { |
51 | 0 | return true; |
52 | 0 | } |
53 | | |
54 | 9.51k | virtual bool is_counter() const { |
55 | 9.51k | return false; |
56 | 9.51k | } |
57 | | |
58 | | virtual InternalType internal_type() const = 0; |
59 | | virtual std::shared_ptr<QLType> ql_type() const = 0; |
60 | | |
61 | | static PTBaseType::SharedPtr FromQLType(MemoryContext *memctx, |
62 | | const std::shared_ptr<QLType>& ql_type); |
63 | | }; |
64 | | |
65 | | template<InternalType itype_, DataType data_type_, bool applicable_for_primary_key_> |
66 | | class PTPrimitiveType : public PTBaseType { |
67 | | public: |
68 | | //------------------------------------------------------------------------------------------------ |
69 | | // Public types. |
70 | | typedef MCSharedPtr<PTPrimitiveType<itype_, data_type_, applicable_for_primary_key_>> SharedPtr; |
71 | | typedef MCSharedPtr<const PTPrimitiveType<itype_, data_type_, applicable_for_primary_key_>> |
72 | | SharedPtrConst; |
73 | | |
74 | | //------------------------------------------------------------------------------------------------ |
75 | | // Constructor and destructor. |
76 | | explicit PTPrimitiveType(MemoryContext *memctx = nullptr, |
77 | | YBLocationPtr loc = nullptr) |
78 | 6.08k | : PTBaseType(memctx, loc) { |
79 | 6.08k | } yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)1, (yb::DataType)1, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 30 | : PTBaseType(memctx, loc) { | 79 | 30 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)2, (yb::DataType)2, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 38 | : PTBaseType(memctx, loc) { | 79 | 38 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)3, (yb::DataType)3, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 3.51k | : PTBaseType(memctx, loc) { | 79 | 3.51k | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 96 | : PTBaseType(memctx, loc) { | 79 | 96 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)8, (yb::DataType)6, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 55 | : PTBaseType(memctx, loc) { | 79 | 55 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)10, (yb::DataType)9, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 50 | : PTBaseType(memctx, loc) { | 79 | 50 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)9, (yb::DataType)10, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 224 | : PTBaseType(memctx, loc) { | 79 | 224 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)21, (yb::DataType)23, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 22 | : PTBaseType(memctx, loc) { | 79 | 22 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)22, (yb::DataType)24, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 19 | : PTBaseType(memctx, loc) { | 79 | 19 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)15, (yb::DataType)11, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 43 | : PTBaseType(memctx, loc) { | 79 | 43 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)16, (yb::DataType)12, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 25 | : PTBaseType(memctx, loc) { | 79 | 25 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)11, (yb::DataType)13, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 28 | : PTBaseType(memctx, loc) { | 79 | 28 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)20, (yb::DataType)25, false>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 42 | : PTBaseType(memctx, loc) { | 79 | 42 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)18, (yb::DataType)17, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 37 | : PTBaseType(memctx, loc) { | 79 | 37 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)19, (yb::DataType)18, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 29 | : PTBaseType(memctx, loc) { | 79 | 29 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)5, (yb::DataType)7, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 53 | : PTBaseType(memctx, loc) { | 79 | 53 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)6, (yb::DataType)8, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 77 | : PTBaseType(memctx, loc) { | 79 | 77 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, false>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 16 | : PTBaseType(memctx, loc) { | 79 | 16 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)7, (yb::DataType)5, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 1.27k | : PTBaseType(memctx, loc) { | 79 | 1.27k | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)12, (yb::DataType)15, false>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 90 | : PTBaseType(memctx, loc) { | 79 | 90 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)13, (yb::DataType)16, false>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 74 | : PTBaseType(memctx, loc) { | 79 | 74 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)14, (yb::DataType)14, false>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 74 | : PTBaseType(memctx, loc) { | 79 | 74 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)12, (yb::DataType)21, false>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 84 | : PTBaseType(memctx, loc) { | 79 | 84 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)17, (yb::DataType)22, true>::PTPrimitiveType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 78 | 97 | : PTBaseType(memctx, loc) { | 79 | 97 | } |
|
80 | 5.54k | virtual ~PTPrimitiveType() { |
81 | 5.54k | } yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)1, (yb::DataType)1, true>::~PTPrimitiveType() Line | Count | Source | 80 | 30 | virtual ~PTPrimitiveType() { | 81 | 30 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)2, (yb::DataType)2, true>::~PTPrimitiveType() Line | Count | Source | 80 | 38 | virtual ~PTPrimitiveType() { | 81 | 38 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)3, (yb::DataType)3, true>::~PTPrimitiveType() Line | Count | Source | 80 | 3.47k | virtual ~PTPrimitiveType() { | 81 | 3.47k | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, true>::~PTPrimitiveType() Line | Count | Source | 80 | 96 | virtual ~PTPrimitiveType() { | 81 | 96 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)8, (yb::DataType)6, true>::~PTPrimitiveType() Line | Count | Source | 80 | 55 | virtual ~PTPrimitiveType() { | 81 | 55 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)10, (yb::DataType)9, true>::~PTPrimitiveType() Line | Count | Source | 80 | 50 | virtual ~PTPrimitiveType() { | 81 | 50 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)9, (yb::DataType)10, true>::~PTPrimitiveType() Line | Count | Source | 80 | 64 | virtual ~PTPrimitiveType() { | 81 | 64 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)21, (yb::DataType)23, true>::~PTPrimitiveType() Line | Count | Source | 80 | 22 | virtual ~PTPrimitiveType() { | 81 | 22 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)22, (yb::DataType)24, true>::~PTPrimitiveType() Line | Count | Source | 80 | 19 | virtual ~PTPrimitiveType() { | 81 | 19 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)15, (yb::DataType)11, true>::~PTPrimitiveType() Line | Count | Source | 80 | 43 | virtual ~PTPrimitiveType() { | 81 | 43 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)16, (yb::DataType)12, true>::~PTPrimitiveType() Line | Count | Source | 80 | 25 | virtual ~PTPrimitiveType() { | 81 | 25 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)11, (yb::DataType)13, true>::~PTPrimitiveType() Line | Count | Source | 80 | 28 | virtual ~PTPrimitiveType() { | 81 | 28 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)20, (yb::DataType)25, false>::~PTPrimitiveType() Line | Count | Source | 80 | 42 | virtual ~PTPrimitiveType() { | 81 | 42 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)18, (yb::DataType)17, true>::~PTPrimitiveType() Line | Count | Source | 80 | 37 | virtual ~PTPrimitiveType() { | 81 | 37 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)19, (yb::DataType)18, true>::~PTPrimitiveType() Line | Count | Source | 80 | 29 | virtual ~PTPrimitiveType() { | 81 | 29 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)5, (yb::DataType)7, true>::~PTPrimitiveType() Line | Count | Source | 80 | 53 | virtual ~PTPrimitiveType() { | 81 | 53 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)6, (yb::DataType)8, true>::~PTPrimitiveType() Line | Count | Source | 80 | 77 | virtual ~PTPrimitiveType() { | 81 | 77 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, false>::~PTPrimitiveType() Line | Count | Source | 80 | 16 | virtual ~PTPrimitiveType() { | 81 | 16 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)7, (yb::DataType)5, true>::~PTPrimitiveType() Line | Count | Source | 80 | 928 | virtual ~PTPrimitiveType() { | 81 | 928 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)12, (yb::DataType)15, false>::~PTPrimitiveType() Line | Count | Source | 80 | 90 | virtual ~PTPrimitiveType() { | 81 | 90 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)13, (yb::DataType)16, false>::~PTPrimitiveType() Line | Count | Source | 80 | 74 | virtual ~PTPrimitiveType() { | 81 | 74 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)14, (yb::DataType)14, false>::~PTPrimitiveType() Line | Count | Source | 80 | 74 | virtual ~PTPrimitiveType() { | 81 | 74 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)12, (yb::DataType)21, false>::~PTPrimitiveType() Line | Count | Source | 80 | 84 | virtual ~PTPrimitiveType() { | 81 | 84 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)17, (yb::DataType)22, true>::~PTPrimitiveType() Line | Count | Source | 80 | 97 | virtual ~PTPrimitiveType() { | 81 | 97 | } |
|
82 | | |
83 | | template<typename... TypeArgs> |
84 | 4.25k | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { |
85 | 4.25k | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); |
86 | 4.25k | } Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)1, (yb::DataType)1, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)1, (yb::DataType)1, true>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)2, (yb::DataType)2, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)2, (yb::DataType)2, true>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)3, (yb::DataType)3, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)3, (yb::DataType)3, true>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, true>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)8, (yb::DataType)6, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)8, (yb::DataType)6, true>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)10, (yb::DataType)9, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)10, (yb::DataType)9, true>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)9, (yb::DataType)10, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)9, (yb::DataType)10, true>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)21, (yb::DataType)23, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)21, (yb::DataType)23, true>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)22, (yb::DataType)24, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)22, (yb::DataType)24, true>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)15, (yb::DataType)11, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)15, (yb::DataType)11, true>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)16, (yb::DataType)12, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)16, (yb::DataType)12, true>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)11, (yb::DataType)13, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)11, (yb::DataType)13, true>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)20, (yb::DataType)25, false> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)20, (yb::DataType)25, false>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)18, (yb::DataType)17, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)18, (yb::DataType)17, true>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)19, (yb::DataType)18, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)19, (yb::DataType)18, true>::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)11, (yb::DataType)13, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)11, (yb::DataType)13, true>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 28 | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 28 | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 28 | } |
std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)20, (yb::DataType)25, false> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)20, (yb::DataType)25, false>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 42 | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 42 | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 42 | } |
std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)18, (yb::DataType)17, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)18, (yb::DataType)17, true>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 37 | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 37 | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 37 | } |
std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)19, (yb::DataType)18, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)19, (yb::DataType)18, true>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 29 | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 29 | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 29 | } |
std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)10, (yb::DataType)9, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)10, (yb::DataType)9, true>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 50 | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 50 | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 50 | } |
std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)8, (yb::DataType)6, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)8, (yb::DataType)6, true>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 55 | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 55 | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 55 | } |
std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)3, (yb::DataType)3, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)3, (yb::DataType)3, true>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 3.51k | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 3.51k | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 3.51k | } |
std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)1, (yb::DataType)1, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)1, (yb::DataType)1, true>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 30 | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 30 | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 30 | } |
std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)2, (yb::DataType)2, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)2, (yb::DataType)2, true>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 38 | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 38 | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 38 | } |
std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, true>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 96 | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 96 | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 96 | } |
std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)15, (yb::DataType)11, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)15, (yb::DataType)11, true>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 43 | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 43 | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 43 | } |
std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)16, (yb::DataType)12, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)16, (yb::DataType)12, true>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 25 | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 25 | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 25 | } |
std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)9, (yb::DataType)10, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)9, (yb::DataType)10, true>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 224 | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 224 | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 224 | } |
std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)21, (yb::DataType)23, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)21, (yb::DataType)23, true>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 22 | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 22 | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 22 | } |
std::__1::shared_ptr<yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)22, (yb::DataType)24, true> > yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)22, (yb::DataType)24, true>::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 84 | 19 | inline static PTPrimitiveType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 85 | 19 | return MCMakeShared<PTPrimitiveType>(memctx, std::forward<TypeArgs>(args)...); | 86 | 19 | } |
|
87 | | |
88 | | // Node type. |
89 | 0 | virtual TreeNodeOpcode opcode() const override { |
90 | 0 | return TreeNodeOpcode::kPTPrimitiveType; |
91 | 0 | } Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)1, (yb::DataType)1, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)2, (yb::DataType)2, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)3, (yb::DataType)3, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)8, (yb::DataType)6, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)10, (yb::DataType)9, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)9, (yb::DataType)10, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)21, (yb::DataType)23, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)22, (yb::DataType)24, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)15, (yb::DataType)11, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)16, (yb::DataType)12, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)11, (yb::DataType)13, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)20, (yb::DataType)25, false>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)18, (yb::DataType)17, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)19, (yb::DataType)18, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)5, (yb::DataType)7, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)6, (yb::DataType)8, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, false>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)7, (yb::DataType)5, true>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)12, (yb::DataType)15, false>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)13, (yb::DataType)16, false>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)14, (yb::DataType)14, false>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)12, (yb::DataType)21, false>::opcode() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)17, (yb::DataType)22, true>::opcode() const |
92 | | |
93 | 0 | virtual InternalType internal_type() const override { |
94 | 0 | return itype_; |
95 | 0 | } Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)1, (yb::DataType)1, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)2, (yb::DataType)2, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)3, (yb::DataType)3, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)8, (yb::DataType)6, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)10, (yb::DataType)9, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)9, (yb::DataType)10, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)21, (yb::DataType)23, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)22, (yb::DataType)24, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)15, (yb::DataType)11, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)16, (yb::DataType)12, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)11, (yb::DataType)13, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)20, (yb::DataType)25, false>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)18, (yb::DataType)17, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)19, (yb::DataType)18, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)5, (yb::DataType)7, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)6, (yb::DataType)8, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, false>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)7, (yb::DataType)5, true>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)12, (yb::DataType)15, false>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)13, (yb::DataType)16, false>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)14, (yb::DataType)14, false>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)12, (yb::DataType)21, false>::internal_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)17, (yb::DataType)22, true>::internal_type() const |
96 | | |
97 | 0 | virtual DataType data_type() const { |
98 | 0 | return data_type_; |
99 | 0 | } Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)1, (yb::DataType)1, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)2, (yb::DataType)2, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)3, (yb::DataType)3, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)8, (yb::DataType)6, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)10, (yb::DataType)9, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)9, (yb::DataType)10, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)21, (yb::DataType)23, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)22, (yb::DataType)24, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)15, (yb::DataType)11, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)16, (yb::DataType)12, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)11, (yb::DataType)13, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)20, (yb::DataType)25, false>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)18, (yb::DataType)17, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)19, (yb::DataType)18, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)5, (yb::DataType)7, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)6, (yb::DataType)8, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, false>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)7, (yb::DataType)5, true>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)12, (yb::DataType)15, false>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)13, (yb::DataType)16, false>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)14, (yb::DataType)14, false>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)12, (yb::DataType)21, false>::data_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)17, (yb::DataType)22, true>::data_type() const |
100 | | |
101 | 9.34k | virtual std::shared_ptr<QLType> ql_type() const override { |
102 | | // Since all instances of a primitive type share one static QLType object, we can just call |
103 | | // "Create" to get the shared object. |
104 | 9.34k | return QLType::Create(data_type_); |
105 | 9.34k | } yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)1, (yb::DataType)1, true>::ql_type() const Line | Count | Source | 101 | 63 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 63 | return QLType::Create(data_type_); | 105 | 63 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)2, (yb::DataType)2, true>::ql_type() const Line | Count | Source | 101 | 83 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 83 | return QLType::Create(data_type_); | 105 | 83 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)3, (yb::DataType)3, true>::ql_type() const Line | Count | Source | 101 | 5.72k | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 5.72k | return QLType::Create(data_type_); | 105 | 5.72k | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, true>::ql_type() const Line | Count | Source | 101 | 189 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 189 | return QLType::Create(data_type_); | 105 | 189 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)8, (yb::DataType)6, true>::ql_type() const Line | Count | Source | 101 | 145 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 145 | return QLType::Create(data_type_); | 105 | 145 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)10, (yb::DataType)9, true>::ql_type() const Line | Count | Source | 101 | 111 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 111 | return QLType::Create(data_type_); | 105 | 111 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)9, (yb::DataType)10, true>::ql_type() const Line | Count | Source | 101 | 321 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 321 | return QLType::Create(data_type_); | 105 | 321 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)21, (yb::DataType)23, true>::ql_type() const Line | Count | Source | 101 | 46 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 46 | return QLType::Create(data_type_); | 105 | 46 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)22, (yb::DataType)24, true>::ql_type() const Line | Count | Source | 101 | 38 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 38 | return QLType::Create(data_type_); | 105 | 38 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)15, (yb::DataType)11, true>::ql_type() const Line | Count | Source | 101 | 78 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 78 | return QLType::Create(data_type_); | 105 | 78 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)16, (yb::DataType)12, true>::ql_type() const Line | Count | Source | 101 | 51 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 51 | return QLType::Create(data_type_); | 105 | 51 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)11, (yb::DataType)13, true>::ql_type() const Line | Count | Source | 101 | 63 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 63 | return QLType::Create(data_type_); | 105 | 63 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)20, (yb::DataType)25, false>::ql_type() const Line | Count | Source | 101 | 42 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 42 | return QLType::Create(data_type_); | 105 | 42 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)18, (yb::DataType)17, true>::ql_type() const Line | Count | Source | 101 | 73 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 73 | return QLType::Create(data_type_); | 105 | 73 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)19, (yb::DataType)18, true>::ql_type() const Line | Count | Source | 101 | 61 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 61 | return QLType::Create(data_type_); | 105 | 61 | } |
Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)12, (yb::DataType)15, false>::ql_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)13, (yb::DataType)16, false>::ql_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)14, (yb::DataType)14, false>::ql_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)12, (yb::DataType)21, false>::ql_type() const Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)17, (yb::DataType)22, true>::ql_type() const yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)5, (yb::DataType)7, true>::ql_type() const Line | Count | Source | 101 | 104 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 104 | return QLType::Create(data_type_); | 105 | 104 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)6, (yb::DataType)8, true>::ql_type() const Line | Count | Source | 101 | 163 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 163 | return QLType::Create(data_type_); | 105 | 163 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, false>::ql_type() const Line | Count | Source | 101 | 16 | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 16 | return QLType::Create(data_type_); | 105 | 16 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)7, (yb::DataType)5, true>::ql_type() const Line | Count | Source | 101 | 1.96k | virtual std::shared_ptr<QLType> ql_type() const override { | 102 | | // Since all instances of a primitive type share one static QLType object, we can just call | 103 | | // "Create" to get the shared object. | 104 | 1.96k | return QLType::Create(data_type_); | 105 | 1.96k | } |
|
106 | | |
107 | 152 | virtual bool IsApplicableForPrimaryKey() override { |
108 | 152 | return applicable_for_primary_key_; |
109 | 152 | } yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)1, (yb::DataType)1, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 3 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 3 | return applicable_for_primary_key_; | 109 | 3 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)2, (yb::DataType)2, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 3 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 3 | return applicable_for_primary_key_; | 109 | 3 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)3, (yb::DataType)3, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 72 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 72 | return applicable_for_primary_key_; | 109 | 72 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 3 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 3 | return applicable_for_primary_key_; | 109 | 3 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)8, (yb::DataType)6, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 3 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 3 | return applicable_for_primary_key_; | 109 | 3 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)10, (yb::DataType)9, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 4 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 4 | return applicable_for_primary_key_; | 109 | 4 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)9, (yb::DataType)10, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 2 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 2 | return applicable_for_primary_key_; | 109 | 2 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)21, (yb::DataType)23, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 2 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 2 | return applicable_for_primary_key_; | 109 | 2 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)22, (yb::DataType)24, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 2 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 2 | return applicable_for_primary_key_; | 109 | 2 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)15, (yb::DataType)11, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 1 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 1 | return applicable_for_primary_key_; | 109 | 1 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)16, (yb::DataType)12, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 1 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 1 | return applicable_for_primary_key_; | 109 | 1 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)11, (yb::DataType)13, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 2 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 2 | return applicable_for_primary_key_; | 109 | 2 | } |
Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)20, (yb::DataType)25, false>::IsApplicableForPrimaryKey() yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)18, (yb::DataType)17, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 2 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 2 | return applicable_for_primary_key_; | 109 | 2 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)19, (yb::DataType)18, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 2 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 2 | return applicable_for_primary_key_; | 109 | 2 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)5, (yb::DataType)7, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 3 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 3 | return applicable_for_primary_key_; | 109 | 3 | } |
yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)6, (yb::DataType)8, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 4 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 4 | return applicable_for_primary_key_; | 109 | 4 | } |
Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, false>::IsApplicableForPrimaryKey() yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)7, (yb::DataType)5, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 20 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 20 | return applicable_for_primary_key_; | 109 | 20 | } |
Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)12, (yb::DataType)15, false>::IsApplicableForPrimaryKey() Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)13, (yb::DataType)16, false>::IsApplicableForPrimaryKey() Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)14, (yb::DataType)14, false>::IsApplicableForPrimaryKey() Unexecuted instantiation: yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)12, (yb::DataType)21, false>::IsApplicableForPrimaryKey() yb::ql::PTPrimitiveType<(yb::QLValuePB::ValueCase)17, (yb::DataType)22, true>::IsApplicableForPrimaryKey() Line | Count | Source | 107 | 23 | virtual bool IsApplicableForPrimaryKey() override { | 108 | 23 | return applicable_for_primary_key_; | 109 | 23 | } |
|
110 | | }; |
111 | | |
112 | | // types with no type arguments |
113 | | template<InternalType itype_, DataType data_type_, bool applicable_for_primary_key_ = true> |
114 | | class PTSimpleType : public PTPrimitiveType<itype_, data_type_, applicable_for_primary_key_> { |
115 | | public: |
116 | | //------------------------------------------------------------------------------------------------ |
117 | | // Public types. |
118 | | typedef MCSharedPtr<PTSimpleType<itype_, data_type_>> SharedPtr; |
119 | | typedef MCSharedPtr<const PTSimpleType<itype_, data_type_>> SharedPtrConst; |
120 | | |
121 | | //------------------------------------------------------------------------------------------------ |
122 | | // Constructor and destructor. |
123 | | explicit PTSimpleType(MemoryContext *memctx = nullptr, |
124 | | YBLocationPtr loc = nullptr) |
125 | 1.41k | : PTPrimitiveType<itype_, data_type_, applicable_for_primary_key_>(memctx, loc) { |
126 | 1.41k | } yb::ql::PTSimpleType<(yb::QLValuePB::ValueCase)5, (yb::DataType)7, true>::PTSimpleType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 125 | 53 | : PTPrimitiveType<itype_, data_type_, applicable_for_primary_key_>(memctx, loc) { | 126 | 53 | } |
yb::ql::PTSimpleType<(yb::QLValuePB::ValueCase)6, (yb::DataType)8, true>::PTSimpleType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 125 | 77 | : PTPrimitiveType<itype_, data_type_, applicable_for_primary_key_>(memctx, loc) { | 126 | 77 | } |
yb::ql::PTSimpleType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, false>::PTSimpleType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 125 | 16 | : PTPrimitiveType<itype_, data_type_, applicable_for_primary_key_>(memctx, loc) { | 126 | 16 | } |
yb::ql::PTSimpleType<(yb::QLValuePB::ValueCase)7, (yb::DataType)5, true>::PTSimpleType(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::YBLocation>) Line | Count | Source | 125 | 1.27k | : PTPrimitiveType<itype_, data_type_, applicable_for_primary_key_>(memctx, loc) { | 126 | 1.27k | } |
|
127 | 1.07k | virtual ~PTSimpleType() { |
128 | 1.07k | } yb::ql::PTSimpleType<(yb::QLValuePB::ValueCase)5, (yb::DataType)7, true>::~PTSimpleType() Line | Count | Source | 127 | 53 | virtual ~PTSimpleType() { | 128 | 53 | } |
yb::ql::PTSimpleType<(yb::QLValuePB::ValueCase)6, (yb::DataType)8, true>::~PTSimpleType() Line | Count | Source | 127 | 77 | virtual ~PTSimpleType() { | 128 | 77 | } |
yb::ql::PTSimpleType<(yb::QLValuePB::ValueCase)4, (yb::DataType)4, false>::~PTSimpleType() Line | Count | Source | 127 | 16 | virtual ~PTSimpleType() { | 128 | 16 | } |
yb::ql::PTSimpleType<(yb::QLValuePB::ValueCase)7, (yb::DataType)5, true>::~PTSimpleType() Line | Count | Source | 127 | 928 | virtual ~PTSimpleType() { | 128 | 928 | } |
|
129 | | }; |
130 | | |
131 | | //-------------------------------------------------------------------------------------------------- |
132 | | // Numeric Types. |
133 | | using PTBoolean = PTSimpleType<InternalType::kBoolValue, DataType::BOOL>; |
134 | | using PTTinyInt = PTSimpleType<InternalType::kInt8Value, DataType::INT8>; |
135 | | using PTSmallInt = PTSimpleType<InternalType::kInt16Value, DataType::INT16>; |
136 | | using PTInt = PTSimpleType<InternalType::kInt32Value, DataType::INT32>; |
137 | | using PTBigInt = PTSimpleType<InternalType::kInt64Value, DataType::INT64>; |
138 | | |
139 | | using PTVarInt = PTSimpleType<InternalType::kVarintValue, DataType::VARINT>; |
140 | | using PTDecimal = PTSimpleType<InternalType::kDecimalValue, DataType::DECIMAL>; |
141 | | |
142 | | class PTFloat : public PTSimpleType<InternalType::kFloatValue, DataType::FLOAT> { |
143 | | public: |
144 | | typedef MCSharedPtr<PTFloat> SharedPtr; |
145 | | typedef MCSharedPtr<const PTFloat> SharedPtrConst; |
146 | | |
147 | | explicit PTFloat(MemoryContext *memctx, |
148 | | YBLocationPtr loc = nullptr, |
149 | | int8_t precision = 24); |
150 | | virtual ~PTFloat(); |
151 | | |
152 | | template<typename... TypeArgs> |
153 | 53 | inline static PTFloat::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { |
154 | 53 | return MCMakeShared<PTFloat>(memctx, std::forward<TypeArgs>(args)...); |
155 | 53 | } Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTFloat> yb::ql::PTFloat::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTFloat> yb::ql::PTFloat::MakeShared<std::__1::shared_ptr<yb::ql::Location>, int>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&, int&&) std::__1::shared_ptr<yb::ql::PTFloat> yb::ql::PTFloat::MakeShared<std::__1::shared_ptr<yb::ql::Location>, long long&>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&, long long&) Line | Count | Source | 153 | 53 | inline static PTFloat::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 154 | 53 | return MCMakeShared<PTFloat>(memctx, std::forward<TypeArgs>(args)...); | 155 | 53 | } |
|
156 | | |
157 | 0 | int8_t precision() const { |
158 | 0 | return precision_; |
159 | 0 | } |
160 | | |
161 | | private: |
162 | | int8_t precision_; |
163 | | }; |
164 | | |
165 | | class PTDouble : public PTSimpleType<InternalType::kDoubleValue, DataType::DOUBLE> { |
166 | | public: |
167 | | typedef MCSharedPtr<PTDouble> SharedPtr; |
168 | | typedef MCSharedPtr<const PTDouble> SharedPtrConst; |
169 | | |
170 | | explicit PTDouble(MemoryContext *memctx, |
171 | | YBLocationPtr loc = nullptr, |
172 | | int8_t precision = 24); |
173 | | virtual ~PTDouble(); |
174 | | |
175 | | template<typename... TypeArgs> |
176 | 77 | inline static PTDouble::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { |
177 | 77 | return MCMakeShared<PTDouble>(memctx, std::forward<TypeArgs>(args)...); |
178 | 77 | } Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTDouble> yb::ql::PTDouble::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) std::__1::shared_ptr<yb::ql::PTDouble> yb::ql::PTDouble::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 176 | 77 | inline static PTDouble::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 177 | 77 | return MCMakeShared<PTDouble>(memctx, std::forward<TypeArgs>(args)...); | 178 | 77 | } |
|
179 | | |
180 | 0 | int8_t precision() const { |
181 | 0 | return precision_; |
182 | 0 | } |
183 | | |
184 | | private: |
185 | | int8_t precision_; |
186 | | }; |
187 | | |
188 | | //-------------------------------------------------------------------------------------------------- |
189 | | // Counter Types. |
190 | | class PTCounter : public PTSimpleType<InternalType::kInt64Value, DataType::INT64, false> { |
191 | | public: |
192 | | typedef MCSharedPtr<PTCounter> SharedPtr; |
193 | | typedef MCSharedPtr<const PTCounter> SharedPtrConst; |
194 | | |
195 | | explicit PTCounter(MemoryContext *memctx, YBLocationPtr loc); |
196 | | virtual ~PTCounter(); |
197 | | |
198 | | template<typename... TypeArgs> |
199 | 16 | inline static PTCounter::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { |
200 | 16 | return MCMakeShared<PTCounter>(memctx, std::forward<TypeArgs>(args)...); |
201 | 16 | } |
202 | | |
203 | 48 | bool is_counter() const { |
204 | 48 | return true; |
205 | 48 | } |
206 | | }; |
207 | | |
208 | | //-------------------------------------------------------------------------------------------------- |
209 | | // Char-based types. |
210 | | |
211 | | class PTCharBaseType : public PTSimpleType<InternalType::kStringValue, DataType::STRING> { |
212 | | public: |
213 | | typedef MCSharedPtr<PTCharBaseType> SharedPtr; |
214 | | typedef MCSharedPtr<const PTCharBaseType> SharedPtrConst; |
215 | | |
216 | | explicit PTCharBaseType(MemoryContext *memctx = nullptr, |
217 | | YBLocationPtr loc = nullptr, |
218 | | ssize_t max_length = -1); |
219 | | virtual ~PTCharBaseType(); |
220 | | |
221 | 0 | ssize_t max_length() { |
222 | 0 | return max_length_; |
223 | 0 | } |
224 | | |
225 | 0 | void set_max_length(ssize_t length) { |
226 | 0 | max_length_ = length; |
227 | 0 | } |
228 | | |
229 | | protected: |
230 | | ssize_t max_length_; |
231 | | }; |
232 | | |
233 | | class PTChar : public PTCharBaseType { |
234 | | public: |
235 | | typedef MCSharedPtr<PTChar> SharedPtr; |
236 | | typedef MCSharedPtr<const PTChar> SharedPtrConst; |
237 | | |
238 | | explicit PTChar(MemoryContext *memctx = nullptr, |
239 | | YBLocationPtr loc = nullptr, |
240 | | int32_t max_length = 1); |
241 | | virtual ~PTChar(); |
242 | | |
243 | | template<typename... TypeArgs> |
244 | 0 | inline static PTChar::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { |
245 | 0 | return MCMakeShared<PTChar>(memctx, std::forward<TypeArgs>(args)...); |
246 | 0 | } |
247 | | |
248 | 0 | virtual InternalType type_id() const { |
249 | 0 | return InternalType::kStringValue; |
250 | 0 | } |
251 | | }; |
252 | | |
253 | | class PTVarchar : public PTCharBaseType { |
254 | | public: |
255 | | typedef MCSharedPtr<PTVarchar> SharedPtr; |
256 | | typedef MCSharedPtr<const PTVarchar> SharedPtrConst; |
257 | | |
258 | | explicit PTVarchar(MemoryContext *memctx = nullptr, |
259 | | YBLocationPtr loc = nullptr, |
260 | | int32_t max_length = 64*1024); |
261 | | virtual ~PTVarchar(); |
262 | | |
263 | | template<typename... TypeArgs> |
264 | 1.27k | inline static PTVarchar::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { |
265 | 1.27k | return MCMakeShared<PTVarchar>(memctx, std::forward<TypeArgs>(args)...); |
266 | 1.27k | } Unexecuted instantiation: std::__1::shared_ptr<yb::ql::PTVarchar> yb::ql::PTVarchar::MakeShared<>(yb::internal::ArenaBase<yb::internal::ArenaTraits>*) std::__1::shared_ptr<yb::ql::PTVarchar> yb::ql::PTVarchar::MakeShared<std::__1::shared_ptr<yb::ql::Location> >(yb::internal::ArenaBase<yb::internal::ArenaTraits>*, std::__1::shared_ptr<yb::ql::Location>&&) Line | Count | Source | 264 | 1.27k | inline static PTVarchar::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { | 265 | 1.27k | return MCMakeShared<PTVarchar>(memctx, std::forward<TypeArgs>(args)...); | 266 | 1.27k | } |
|
267 | | |
268 | 0 | virtual InternalType type_id() const { |
269 | 0 | return InternalType::kStringValue; |
270 | 0 | } |
271 | | }; |
272 | | |
273 | | // Other char-based types. |
274 | | using PTJsonb = PTSimpleType<InternalType::kJsonbValue, DataType::JSONB, false>; |
275 | | using PTInet = PTSimpleType<InternalType::kInetaddressValue, DataType::INET>; |
276 | | using PTBlob = PTSimpleType<InternalType::kBinaryValue, DataType::BINARY>; |
277 | | |
278 | | //-------------------------------------------------------------------------------------------------- |
279 | | // UUID types. |
280 | | using PTUuid = PTSimpleType<InternalType::kUuidValue, DataType::UUID>; |
281 | | using PTTimeUuid = PTSimpleType<InternalType::kTimeuuidValue, DataType::TIMEUUID>; |
282 | | |
283 | | //-------------------------------------------------------------------------------------------------- |
284 | | // Datetime types. |
285 | | using PTTimestamp = PTSimpleType<InternalType::kTimestampValue, DataType::TIMESTAMP>; |
286 | | using PTDate = PTSimpleType<InternalType::kDateValue, DataType::DATE>; |
287 | | using PTTime = PTSimpleType<InternalType::kTimeValue, DataType::TIME>; |
288 | | |
289 | | //-------------------------------------------------------------------------------------------------- |
290 | | // Collection types. |
291 | | class PTMap : public PTPrimitiveType<InternalType::kMapValue, DataType::MAP, false> { |
292 | | public: |
293 | | typedef MCSharedPtr<PTMap> SharedPtr; |
294 | | typedef MCSharedPtr<const PTMap> SharedPtrConst; |
295 | | |
296 | | PTMap(MemoryContext *memctx, |
297 | | YBLocationPtr loc, |
298 | | const PTBaseType::SharedPtr& keys_type, |
299 | | const PTBaseType::SharedPtr& values_type); |
300 | | |
301 | | virtual ~PTMap(); |
302 | | |
303 | | template<typename... TypeArgs> |
304 | 90 | inline static PTMap::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { |
305 | 90 | return MCMakeShared<PTMap>(memctx, std::forward<TypeArgs>(args)...); |
306 | 90 | } |
307 | | |
308 | 118 | virtual std::shared_ptr<QLType> ql_type() const { |
309 | 118 | return ql_type_; |
310 | 118 | } |
311 | | |
312 | | virtual CHECKED_STATUS Analyze(SemContext *sem_context); |
313 | | |
314 | | protected: |
315 | | PTBaseType::SharedPtr keys_type_; |
316 | | PTBaseType::SharedPtr values_type_; |
317 | | std::shared_ptr<QLType> ql_type_; |
318 | | }; |
319 | | |
320 | | class PTSet : public PTPrimitiveType<InternalType::kSetValue, DataType::SET, false> { |
321 | | public: |
322 | | typedef MCSharedPtr<PTSet> SharedPtr; |
323 | | typedef MCSharedPtr<const PTSet> SharedPtrConst; |
324 | | |
325 | | PTSet(MemoryContext *memctx, |
326 | | YBLocationPtr loc, |
327 | | const PTBaseType::SharedPtr& elems_type); |
328 | | |
329 | | virtual ~PTSet(); |
330 | | |
331 | | template<typename... TypeArgs> |
332 | 74 | inline static PTSet::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { |
333 | 74 | return MCMakeShared<PTSet>(memctx, std::forward<TypeArgs>(args)...); |
334 | 74 | } |
335 | | |
336 | 121 | virtual std::shared_ptr<QLType> ql_type() const { |
337 | 121 | return ql_type_; |
338 | 121 | } |
339 | | |
340 | | virtual CHECKED_STATUS Analyze(SemContext *sem_context); |
341 | | |
342 | | protected: |
343 | | PTBaseType::SharedPtr elems_type_; |
344 | | std::shared_ptr<QLType> ql_type_; |
345 | | }; |
346 | | |
347 | | class PTList : public PTPrimitiveType<InternalType::kListValue, DataType::LIST, false> { |
348 | | public: |
349 | | typedef MCSharedPtr<PTList> SharedPtr; |
350 | | typedef MCSharedPtr<const PTList> SharedPtrConst; |
351 | | |
352 | | PTList(MemoryContext *memctx, |
353 | | YBLocationPtr loc, |
354 | | const PTBaseType::SharedPtr& elems_type); |
355 | | |
356 | | virtual ~PTList(); |
357 | | |
358 | | template<typename... TypeArgs> |
359 | 74 | inline static PTList::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { |
360 | 74 | return MCMakeShared<PTList>(memctx, std::forward<TypeArgs>(args)...); |
361 | 74 | } |
362 | | |
363 | 103 | virtual std::shared_ptr<QLType> ql_type() const { |
364 | 103 | return ql_type_; |
365 | 103 | } |
366 | | |
367 | | virtual CHECKED_STATUS Analyze(SemContext *sem_context); |
368 | | |
369 | | protected: |
370 | | PTBaseType::SharedPtr elems_type_; |
371 | | std::shared_ptr<QLType> ql_type_; |
372 | | }; |
373 | | |
374 | | class PTUserDefinedType : public PTPrimitiveType<InternalType::kMapValue, |
375 | | DataType::USER_DEFINED_TYPE, |
376 | | false> { |
377 | | public: |
378 | | typedef MCSharedPtr<PTUserDefinedType> SharedPtr; |
379 | | typedef MCSharedPtr<const PTUserDefinedType> SharedPtrConst; |
380 | | |
381 | | PTUserDefinedType(MemoryContext *memctx, |
382 | | YBLocationPtr loc, |
383 | | const PTQualifiedName::SharedPtr& name); |
384 | | |
385 | | virtual ~PTUserDefinedType(); |
386 | | |
387 | | template<typename... TypeArgs> |
388 | 84 | inline static PTUserDefinedType::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { |
389 | 84 | return MCMakeShared<PTUserDefinedType>(memctx, std::forward<TypeArgs>(args)...); |
390 | 84 | } |
391 | | |
392 | | virtual CHECKED_STATUS Analyze(SemContext *sem_context); |
393 | | |
394 | 233 | virtual std::shared_ptr<QLType> ql_type() const { |
395 | 233 | return ql_type_; |
396 | 233 | } |
397 | | |
398 | | private: |
399 | | PTQualifiedName::SharedPtr name_; |
400 | | |
401 | | // These fields will be set during analysis (retrieving type info from metadata server) |
402 | | std::shared_ptr<QLType> ql_type_; |
403 | | }; |
404 | | |
405 | | class PTFrozen : public PTPrimitiveType<InternalType::kFrozenValue, DataType::FROZEN, true> { |
406 | | public: |
407 | | typedef MCSharedPtr<PTFrozen> SharedPtr; |
408 | | typedef MCSharedPtr<const PTFrozen> SharedPtrConst; |
409 | | |
410 | | PTFrozen(MemoryContext *memctx, |
411 | | YBLocationPtr loc, |
412 | | const PTBaseType::SharedPtr& elems_type); |
413 | | |
414 | | virtual ~PTFrozen(); |
415 | | |
416 | | template<typename... TypeArgs> |
417 | 97 | inline static PTFrozen::SharedPtr MakeShared(MemoryContext *memctx, TypeArgs&&... args) { |
418 | 97 | return MCMakeShared<PTFrozen>(memctx, std::forward<TypeArgs>(args)...); |
419 | 97 | } |
420 | | |
421 | | virtual CHECKED_STATUS Analyze(SemContext *sem_context); |
422 | | |
423 | 254 | virtual std::shared_ptr<QLType> ql_type() const { |
424 | 254 | return ql_type_; |
425 | 254 | } |
426 | | |
427 | | private: |
428 | | PTBaseType::SharedPtr elems_type_; |
429 | | std::shared_ptr<QLType> ql_type_; |
430 | | }; |
431 | | |
432 | | } // namespace ql |
433 | | } // namespace yb |
434 | | |
435 | | #endif // YB_YQL_CQL_QL_PTREE_PT_TYPE_H_ |