[Modeling-users] ec.fetch and SQL "in"
Status: Abandoned
Brought to you by:
sbigaret
From: Yannick G. <yan...@sa...> - 2003-07-07 16:10:24
|
=2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi,=20 Is there a way to make a fetch the same way you do with the SQL "in" ? ex: "status in [1, 2, 5, 23]" It is not that hard to make something like :=20 =20 qryLines =3D [] for status in statuses: qryLines.append("( status =3D=3D %d)" % status) qry =3D " OR ".join(qryLines) but it look like a hack to me and is probably really inefficient for large lists since spark and the DBMS will have quite a ugly string to parse. =20 =2D --=20 Yannick Gingras Byte Gardener, Savoir-faire Linux inc. (514) 276-5468 =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE/CZtsrhy5Fqn/MRARAjv2AJ0U9yhkMoVr7I78mmLwXZgbV4WgUgCghp5N DdNV1VCDc5k7JkCCEsWyKTU=3D =3Dvy0y =2D----END PGP SIGNATURE----- |