You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried to use named parameters with the Kotlin code generator, but ran into an error. I recreated the issue in the unit tests and came to know that Kotlin enforces the use of positional parameters with the Postgres engine.
Is it possible to get some guidance on which specific areas of the Kotlin code generator I should look at to add support for named parameters
Relevant log output
src/main/resources/authors/postgresql/query.sql:1:1: edited query syntax is invalid: syntax error at or near "dentifivation"
src/main/resources/authors/postgresql/query.sql:10:1: edited query syntax is invalid: syntax error at or near "ame"
src/main/resources/authors/postgresql/query.sql:18:1: edited query syntax is invalid: syntax error at or near "d"
Database schema
CREATETABLEauthors (
id BIGSERIALPRIMARY KEY,
name textNOT NULL,
bio text
);
SQL queries
-- name: GetAuthor :oneSELECT*FROM authors
WHERE id = @identifivation LIMIT @lim;
-- name: ListAuthors :manySELECT*FROM authors
ORDER BY name;
-- name: CreateAuthor :oneINSERT INTO authors (
name, bio
) VALUES (
@name, @bio
)
RETURNING *;
-- name: DeleteAuthor :execDELETEFROM authors
WHERE id = @id;
The Kotlin code generation currently doesn't support named parameters. Sadly Kotlin support isn't actively being worked on, so you'll need to continue to use positional parameters.
Version
1.12.0
What happened?
Tried to use named parameters with the Kotlin code generator, but ran into an error. I recreated the issue in the unit tests and came to know that Kotlin enforces the use of positional parameters with the Postgres engine.
Is it possible to get some guidance on which specific areas of the Kotlin code generator I should look at to add support for named parameters
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
No response
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Kotlin
The text was updated successfully, but these errors were encountered: