mgutz / dat

Go Postgres Data Access Toolkit
Other
612 stars 62 forks source link

OrderBy needs to accept arguments like Where does #29

Closed flyingmutant closed 8 years ago

flyingmutant commented 9 years ago

To enable things like

ORDER BY table.col <-> $1
nickmarx12345678 commented 8 years ago

+1, Also have run into cases where this functionality in FROM would be handy too

mgutz commented 8 years ago

I'm not familiar with such expression. Is the $1 a column name or value? Can you provide some examples?

flyingmutant commented 8 years ago

<-> in the example above is from pg_trgm; $1 is a value. This is an example of ordering the result set based on trigram distance to some user input (query).