yet another refinement now that I am using 0.9.7 and my previous fix for this issue seems to be moot...
def __processQueryResult(self, query_result):
""" processes the result from a query or queryAll call into an
Batch, calling queryMore as necessary to complete the query
operation
@param query_result: return result from a query or queryAll call
@note: Although queryMore also returns a query_result this is not intended to be a primary input to this method. Rather, these are
handled internally to this method and aggregated into the query_result_batch
@return: a Batch populated with the sobject(s) found by the
query call that produced the query_result parameter.
@rtype: pyax.sobject.batch.Batch
""" sobject_records, done, query_locator = self._unpackQueryResult(query_result) sobject_records = sobject_records if (isinstance(sobject_records,list)) else [sobject_records]
while not done: records, done, query_locator = self._unpackQueryResult(query_result) sobject_records.extend(records)
query_result_batch = self.__resultToObject(sobject_records)
if (done is True) and (len(query_result_batch) == 0): query_result_batch = dict([(k,query_result[k]._dir) for k in query_result.keys()])
return query_result_batch
This fix seeks to return the COUNT() as a dict.
This is just my 2 cents since the original pyax code did not even handle the COUNT() SOQL Statement at-all but if it did handle COUNT() it was not clear to me from the code I saw from pyax.
yet another refinement now that I am using 0.9.7 and my previous fix for this issue seems to be moot...
def __processQueryR esult(self, query_result):
""" processes the result from a query or queryAll call into an
Batch, calling queryMore as necessary to complete the query
operation
@param query_result: return result from a query or queryAll call
intended to be a primary input to this method. Rather, these are
query_ result_ batch
@note: Although queryMore also returns a query_result this is not
handled internally to this method and aggregated into the
@return: a Batch populated with the sobject(s) found by the batch.Batch
sobject_ records, done, query_locator = self._unpackQue ryResult( query_result)
sobject_ records = sobject_records if (isinstance( sobject_ records, list)) else [sobject_records]
records, done, query_locator = self._unpackQue ryResult( query_result)
sobject_ records. extend( records)
query call that produced the query_result parameter.
@rtype: pyax.sobject.
"""
while not done:
if (done is True) and (len(query_
return query_result_batch
This fix seeks to return the COUNT() as a dict.
This is just my 2 cents since the original pyax code did not even handle the COUNT() SOQL Statement at-all but if it did handle COUNT() it was not clear to me from the code I saw from pyax.