I want to use django against a webservice like dbslayer -
http://code.nytimes.com/projects/dbslayer
(which is basically Mysql over http).
I have it basically working (firing off selects and getting the
results), but It seems like django is getting itself into a look and
calling 'fetchmany' over and over.
this is what i'm seeing:
In [2]: Url.objects.get(pk=5)
SELECT `url`.`id`, `url`.`domain_id`, `url`.`URL`, `url`.`title`,
`url`.`description`, `url`.`update_at` FROM `url` WHERE `url`.`id` =
BINARY %s ORDER BY `url`.`title` ASC
fetchmany 100
http://localhost:8080/jAtomics/select/?q=SELECT+%60url%60.%60id%60%2C+%60url%60.%60domain_id%60%2C+%60url%60.%60URL%60%2C+%60url%60.%60title%60%2C+%60url%60.%60description%60%2C+%60url%60.%60update_at%60+FROM+%60url%60+WHERE+%60url%60.%60id%60+%3D+BINARY+5++ORDER+BY+%60url%60.%60title%60+ASC&start=1&rows=100&version=1&format=json
[]
fetchmany 100
http://localhost:8080/jAtomics/select/?q=SELECT+%60url%60.%60id%60%2C+%60url%60.%60domain_id%60%2C+%60url%60.%60URL%60%2C+%60url%60.%60title%60%2C+%60url%60.%60description%60%2C+%60url%60.%60update_at%60+FROM+%60url%60+WHERE+%60url%60.%60id%60+%3D+BINARY+5++ORDER+BY+%60url%60.%60title%60+ASC&start=101&rows=100&version=1&format=json
[]
how do I get fetchmany from stop asking for more rows?
TIA
Ian
I'm guessing you need to override
BaseDatabaseFeatures.empty_fetchmany_value to be the correct empty
sequence.
Regards,
Malcolm
Thanks Malcom.
we use something called atomics
(http://conferences.oreillynet.com/cs/mysqluc2005/view/e_sess/7066 )
which was never opensourced... but it is pretty much the same as dbslayer.
I'll look at getting the java-version of it opensourced.