We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
postgresql
sqlc-gen-kotlin_1.2.0.wasm
22b437ecaea66417bbd3b958339d9868ba89368ce542c936c37305acf373104b
I have the following migration.
CREATE TABLE counts ( slug text PRIMARY KEY, count numeric NOT NULL, increments numeric );
I have the following queries.
-- name: ListCounts :many SELECT * FROM counts; -- name: CreateCounts :one INSERT INTO counts ( slug, count, increments ) VALUES ( $1, $2, $3 ) RETURNING *;
The generated models
data class Count ( val slug: String, val count: java.math.BigDecimal, val increments: java.math.BigDecimal? )
Generated queries
@Throws(SQLException::class) override fun createCounts( slug: String, count: java.math.BigDecimal, increments: java.math.BigDecimal?): Count? { return conn.prepareStatement(createCounts).use { stmt -> stmt.setString(1, slug) stmt.setjava.math.BigDecimal(2, count) stmt.setjava.math.BigDecimal(3, increments) val results = stmt.executeQuery() if (!results.next()) { return null } val ret = Count( results.getString(1), results.getjava.math.BigDecimal(2), results.getjava.math.BigDecimal(3) ) if (results.next()) { throw SQLException("expected one row in result set, but got many") } ret } }
stmt.setjava.math.BigDecimal
results.getjava.math.BigDecimal
BigDecimal
java.math.BigDecimal
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Environment
postgresql
sqlc-gen-kotlin_1.2.0.wasm
/22b437ecaea66417bbd3b958339d9868ba89368ce542c936c37305acf373104b
Issue
Setup
I have the following migration.
I have the following queries.
Generated Code
The generated models
Generated queries
Errors
stmt.setjava.math.BigDecimal
results.getjava.math.BigDecimal
Proposed changes
BigDecimal
and importjava.math.BigDecimal
when usedThe text was updated successfully, but these errors were encountered: