में एक दृश्य पूछना मैं जानना चाहता हूं कि SQLAlchemy को किसी प्रश्न पूछने में समस्याएं हैं या नहीं। अगर मैं की तरह सर्वर पर सामान्य एसक्यूएल के साथ दृश्य क्वेरी:SQLAlchemy
SELECT * FROM ViewMyTable WHERE index1 = '608_56_56';
मैं रिकॉर्ड की एक पूरी गुच्छा मिलता है। लेकिन स्क्लेक्लेमी के साथ मुझे केवल पहला मिलता है। लेकिन गिनती में सही संख्या है। मुझे कोई जानकारी नहीं है की क्यों।
यह मेरा एसक्लाक्लेमी कोड है।
myQuery = Session.query(ViewMyTable)
erg = myQuery.filter(ViewMyTable.index1 == index1.strip())
# Contains the correct number of all entries I found with that query.
totalCount = erg.count()
# Contains only the first entry I found with my query.
ergListe = erg.all()