Comments (4)
You mean this?:
-- name: OrderAuthorsById :many
SELECT * FROM authors
ORDER BY id
LIMIT $1;
from sqlc.
yes. especially, for ORDER clause. for limit, maybe it is engine dependent can 't remember for sure.
from sqlc.
Well I don't think this problem is within the scope of this package. This thread on the Postgres mailing list has some details on the matter.
It appears that prepared statements receive values, while the ORDER clause receives identifiers. So apparently, it is not possible to have dynamic values for the ORDER clause.
from sqlc.
@euller88 is correct. sqlc supports parameterized limits, but can not support parameterized ordering.
from sqlc.
Related Issues (20)
- The input for the comparison to the sum of length should be of type int.
- mysql copyfrom method not included in generated querier interface
- Not recognizing sqlc.arg after ON CONFLICT.
- getting-started-sqlite.md - wrong return value of queries.CreateAuthor
- 1.26.0 crashes on subquery without alias
- query execlastid for pgx/v5 is silently ignored
- Cannot use option "initialisms" from the documentation HOT 1
- Generate fails for UPDATE ... FROM (...) with subquery HOT 1
- Query "SELECT * FROM unnest(..)" has wrong generated code
- Determine which indices are needed for efficient execution of a query HOT 5
- Interpret schema migrations numerically
- Temp table created using schema.sql is not insertable. HOT 3
- Incorrect code gen without
- Basic usage - relation "x" does not exist HOT 2
- underscore is not properly supported HOT 1
- Fails if structure is mysqldump containing rocksdb_has_p_s_session_variables
- Missing columns not being detected
- Error "not enough args to execute query" on complex select query.
- Does it support logging of executed SQL? HOT 1
- Generate in-memory mocked implementation of the Querier interface HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sqlc.