diff --git a/build.gradle b/build.gradle index 752504c..8264332 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ plugins { } group = 'herbaccara' -version = '0.0.12' +version = '0.0.13' sourceCompatibility = '17' publishing { diff --git a/src/main/kotlin/herbaccara/jooq/Pagination.kt b/src/main/kotlin/herbaccara/jooq/Pagination.kt index b687d56..36f02b6 100644 --- a/src/main/kotlin/herbaccara/jooq/Pagination.kt +++ b/src/main/kotlin/herbaccara/jooq/Pagination.kt @@ -76,7 +76,7 @@ class Pagination { } else { dsl .select(DSL.count()) - .from("( $sql )") + .from("( $sql )", *query.bindValues.toTypedArray()) .single() .value1() } diff --git a/src/test/kotlin/herbaccara/jooq/PaginationTest.kt b/src/test/kotlin/herbaccara/jooq/PaginationTest.kt index 5f8ef5c..0c41a85 100644 --- a/src/test/kotlin/herbaccara/jooq/PaginationTest.kt +++ b/src/test/kotlin/herbaccara/jooq/PaginationTest.kt @@ -20,8 +20,8 @@ class PaginationTest { private val table = DSL.table("\"board\"") - private val id = table.field("id", Int::class.java) - private val title = table.field("title", String::class.java) + private val id = DSL.field("id", Int::class.java) + private val title = DSL.field("title", String::class.java) private val baseQuery = dsl .select(