Skip to content

Commit bd60791

Browse files
author
Barnabás Domozi
committed
Fix CppFunction join type.
By default, ODB uses left join instead of inner join causing incorrect metrics values.
1 parent 93cc594 commit bd60791

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

plugins/cpp/model/include/model/cppfunction.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ struct CppFunction : CppTypedEntity
3636
typedef std::shared_ptr<CppFunction> CppFunctionPtr;
3737

3838
#pragma db view \
39-
object(CppFunction) object(CppVariable = Parameters : CppFunction::parameters)
39+
object(CppFunction) object(CppVariable = Parameters inner : CppFunction::parameters)
4040
struct CppFunctionParamCount
4141
{
4242
#pragma db column("count(" + Parameters::id + ")")
@@ -45,7 +45,7 @@ struct CppFunctionParamCount
4545

4646
#pragma db view \
4747
object(CppFunction) \
48-
object(CppVariable = Parameters : CppFunction::parameters) \
48+
object(CppVariable = Parameters inner : CppFunction::parameters) \
4949
object(CppAstNode : CppFunction::astNodeId == CppAstNode::id) \
5050
object(File : CppAstNode::location.file) \
5151
query((?) + "GROUP BY" + cc::model::CppEntity::astNodeId + "," + cc::model::File::path)
@@ -59,7 +59,7 @@ struct CppFunctionParamCountWithId
5959
};
6060

6161
#pragma db view \
62-
object(CppFunction) object(CppVariable = Locals : CppFunction::locals)
62+
object(CppFunction) object(CppVariable = Locals inner : CppFunction::locals)
6363
struct CppFunctionLocalCount
6464
{
6565
#pragma db column("count(" + Locals::id + ")")
@@ -97,7 +97,7 @@ struct CppFunctionBumpyRoad
9797

9898
#pragma db view \
9999
object(CppFunction) \
100-
object(CppVariable = Parameters : CppFunction::parameters)
100+
object(CppVariable = Parameters inner : CppFunction::parameters)
101101
struct CppFunctionParamTypeView
102102
{
103103
#pragma db column(CppFunction::astNodeId)
@@ -109,7 +109,7 @@ struct CppFunctionParamTypeView
109109

110110
#pragma db view \
111111
object(CppFunction) \
112-
object(CppVariable = Locals : CppFunction::locals)
112+
object(CppVariable = Locals inner : CppFunction::locals)
113113
struct CppFunctionLocalTypeView
114114
{
115115
#pragma db column(CppFunction::astNodeId)

0 commit comments

Comments
 (0)