Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Commit

Permalink
fix: select params in QueryBuilder should set the FilterBuilder (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
ponytailer authored Jun 14, 2022
1 parent 04e520f commit 9d75db5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ open class PostgrestBuilder<T : Any> {
this.body = builder.body
this.jsonConverter = builder.jsonConverter
this.schema = schema

builder.searchParams.forEach {
(name, value) -> setSearchParam(name, value)
}
}

constructor(url: URI, httpClient: PostgrestHttpClient, jsonConverter: PostgrestJsonConverter, headers: Map<String, String>, schema: String?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ import assertk.assertions.isEqualTo
import io.mockk.mockk
import org.junit.jupiter.api.BeforeEach
import org.junit.jupiter.api.Test
import java.net.URI
import kotlin.reflect.KProperty1

internal class PostgrestFilterBuilderTest {

private val postgrestBuilderMock = mockk<PostgrestBuilder<Any>>()
private val postgrestBuilderMock = PostgrestBuilder<Any>(URI(""), mockk(), mockk(), emptyMap(), null)

private var filterBuilder: PostgrestFilterBuilder<Any>? = null

@BeforeEach
Expand Down

0 comments on commit 9d75db5

Please sign in to comment.