If you want to 'OR' the clause array you send over to the salesforce 'GET' endpoints, you're SOL. We currently hard code like this:
def whereify(self, array, object):
out = ""
for clause in array:
if clause['op'] == "IN": #If the op type is 'IN' we don't want to wrap our array in quotes.
out += "AND %s %s %s " % (clause['a'], clause['op'], clause['b'])
else:
out += "AND %s %s %s " % (clause['a'], clause['op'], "{}".format(clause['b']) if self.isnum(clause['b']) else "'{}'".format(clause['b']))
return out[4:]
We need to either offer a more elegant means of allowing the user to specify ANDs vs. ORs in the clauses.
OR we just abandon the whole modular portion of this and take the entire query as a parameter.
If you want to 'OR' the clause array you send over to the salesforce 'GET' endpoints, you're SOL. We currently hard code like this:
We need to either offer a more elegant means of allowing the user to specify ANDs vs. ORs in the clauses.
OR we just abandon the whole modular portion of this and take the entire query as a parameter.