mirror of
https://github.com/getml/sqlgen.git
synced 2026-01-06 09:30:07 -06:00
More consistens naming
This commit is contained in:
@@ -12,17 +12,17 @@ struct Condition {
|
||||
};
|
||||
|
||||
template <class C1, class C2>
|
||||
auto operator&&(const Condition<C1>& _lhs, const Condition<C2>& _rhs) {
|
||||
auto operator&&(const Condition<C1>& _cond1, const Condition<C2>& _cond2) {
|
||||
return Condition<conditions::And<C1, C2>>{
|
||||
.condition = conditions::And<C1, C2>{.lhs = _lhs.condition,
|
||||
.rhs = _rhs.condition}};
|
||||
.condition = conditions::And<C1, C2>{.cond1 = _cond1.condition,
|
||||
.cond2 = _cond2.condition}};
|
||||
}
|
||||
|
||||
template <class C1, class C2>
|
||||
auto operator||(const Condition<C1>& _lhs, const Condition<C2>& _rhs) {
|
||||
auto operator||(const Condition<C1>& _cond1, const Condition<C2>& _cond2) {
|
||||
return Condition<conditions::Or<C1, C2>>{
|
||||
.condition =
|
||||
conditions::Or<C1, C2>{.lhs = _lhs.condition, .rhs = _rhs.condition}};
|
||||
.condition = conditions::Or<C1, C2>{.cond1 = _cond1.condition,
|
||||
.cond2 = _cond2.condition}};
|
||||
}
|
||||
|
||||
} // namespace sqlgen::transpilation
|
||||
|
||||
@@ -5,8 +5,8 @@ namespace sqlgen::transpilation::conditions {
|
||||
|
||||
template <class CondType1, class CondType2>
|
||||
struct And {
|
||||
CondType1 lhs;
|
||||
CondType2 rhs;
|
||||
CondType1 cond1;
|
||||
CondType2 cond2;
|
||||
};
|
||||
|
||||
template <class OpType1, class OpType2>
|
||||
@@ -47,8 +47,8 @@ struct LesserThan {
|
||||
|
||||
template <class CondType1, class CondType2>
|
||||
struct Or {
|
||||
CondType1 lhs;
|
||||
CondType2 rhs;
|
||||
CondType1 cond1;
|
||||
CondType2 cond2;
|
||||
};
|
||||
|
||||
} // namespace sqlgen::transpilation::conditions
|
||||
|
||||
@@ -29,9 +29,9 @@ struct ToCondition<T, conditions::And<CondType1, CondType2>> {
|
||||
return dynamic::Condition{
|
||||
.val = dynamic::Condition::And{
|
||||
.cond1 = Ref<dynamic::Condition>::make(
|
||||
ToCondition<T, std::remove_cvref_t<CondType1>>{}(_cond.lhs)),
|
||||
ToCondition<T, std::remove_cvref_t<CondType1>>{}(_cond.cond1)),
|
||||
.cond2 = Ref<dynamic::Condition>::make(
|
||||
ToCondition<T, std::remove_cvref_t<CondType2>>{}(_cond.rhs)),
|
||||
ToCondition<T, std::remove_cvref_t<CondType2>>{}(_cond.cond2)),
|
||||
}};
|
||||
}
|
||||
};
|
||||
@@ -43,9 +43,9 @@ struct ToCondition<T, conditions::Or<CondType1, CondType2>> {
|
||||
return dynamic::Condition{
|
||||
.val = dynamic::Condition::Or{
|
||||
.cond1 = Ref<dynamic::Condition>::make(
|
||||
ToCondition<T, std::remove_cvref_t<CondType1>>{}(_cond.lhs)),
|
||||
ToCondition<T, std::remove_cvref_t<CondType1>>{}(_cond.cond1)),
|
||||
.cond2 = Ref<dynamic::Condition>::make(
|
||||
ToCondition<T, std::remove_cvref_t<CondType2>>{}(_cond.rhs)),
|
||||
ToCondition<T, std::remove_cvref_t<CondType2>>{}(_cond.cond2)),
|
||||
}};
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user