These are chat archives for aacanakin/qb

16th
Sep 2016
Aras Can Akin
@aacanakin
Sep 16 2016 10:21
Hi @cdevienne, I looked into your reimplementation of conditionals. It's using reflection. I think it should be further discussed and thought. You created an issue asking for col.Eq(col). Could it be done using just col.EqCol(col)?
Ok I understood that BinaryExpression uses left right clauses and an operator
Aras Can Akin
@aacanakin
Sep 16 2016 10:33
I don't understand why Conditional renamed into BinaryExpressionClause btw
Christophe de Vienne
@cdevienne
Sep 16 2016 13:22
The renaming is because SQLAlchemy named the conditional BinaryExpression, which is more accurate from an AST point of vue
The reflect I added is only to have a natural way of writing the expressions.
We could add specialized versions of the operators, like EqClause() and/or EqValue()
for In/NotIn we would have InValues(), InClauses(), InClause()
Seems not a bad idea. I can make another PR to do so.
Christophe de Vienne
@cdevienne
Sep 16 2016 13:28
We could keep the reflect-based simpler versions (Eq(), In()) that accept anything, and the specialized versions that promess not to use reflect