← Back to team overview

pyax team mailing list archive

Re: [Bug 317723] Re: pyax fails to return when result set contains a lotof data

 

Replicate the original problem that drove my bug fix by issuing the 
following SOQL on any SalesForce object you may desire to use:

SELECT COUNT() from Case

This should return a scalar value rather than an object.

My bug fix returns the scalar as a list of dict() values where the 'size' 
key from the dict has the scalar value.


--------------------------------------------------
From: "Kevin Shuk" <surf@xxxxxxxxxxxxx>
Sent: Friday, January 23, 2009 9:00 AM
To: <raychorn@xxxxxxxxxxx>
Subject: [Bug 317723] Re: pyax fails to return when result set contains a 
lotof data

> Looking at my code, and knowing what I intended, sobject_records being
> returned from _unpackQueryResult should always be a list.
>
> I'm not sure what exactly is causing this retval to be a scalar of a
> single record instead of a list of one record - if it's the size of the
> return payload or something else.
>
> I don't know offhand how to replicate the problem reliably to create a
> failing test that I can then fix, but my initial reaction would be to
> use my "listify" utility function on this value before returning it from
> _unpackQueryResult.
>
> listify is a generalised function that does what the suggestion in your
> comment above does.
>
> ** Changed in: pyax
>   Importance: Undecided => Medium
>     Assignee: (unassigned) => Kevin Shuk (surf)
>       Status: New => Confirmed
>
> -- 
> pyax fails to return when result set contains a lot of data
> https://bugs.launchpad.net/bugs/317723
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Salesforce.com Apex API library for Python: Confirmed
>
> Bug description:
> In connection.py:
>
> The following code fails:
>
>        sobject_records, done, query_locator = 
> self._unpackQueryResult(query_result)
>        while done is False:
>            records, done, query_locator = 
> self._unpackQueryResult(query_result)
>            sobject_records.extend(records)
>
> The exception says:
>
> sobject_records has no attribute "extend".
>
> sobject_records is an instance of dict and dict cannot respond to "extend" 
> however from the code it appears the intent was to add the contents of the 
> records "dict" to the sobject_records "dict" and some time ago I coded a 
> type of dict object that knows how to do this by using the "+" operator 
> and so I will add my fix to your code so I can proceed to get my work 
> done.
>
> Perhaps the developers of pyax might fix this bug at some point before 
> others notice it too.
>

-- 
pyax fails to return when result set contains a lot of data
https://bugs.launchpad.net/bugs/317723
You received this bug notification because you are a member of pyax
Developers, which is the registrant for pyax.



References