Jaymon / prom

A PostgreSQL or SQLite orm for Python
MIT License
22 stars 4 forks source link

Add TOP to prom.query.Query? #107

Open Jaymon opened 4 years ago

Jaymon commented 4 years ago
SELECT TOP <INTEGER> WITH TIES <TABLE_FIELDS>
FROM <TABLE_NAME>
ORDER BY <TABLE_FIELD> DESC

I'm not 100% sure why this is better than:

SELECT <TABLE_FIELDS> FROM <TABLE_NAME> ORDER BY <TABLE_FIELD> DESC LIMIT <INTEGER>

But I figured I would make a note

Via: