Add tests for Find functions

This commit is contained in:
2025-03-01 17:17:32 -05:00
parent 864477f997
commit 32f8db6196
7 changed files with 592 additions and 3 deletions

View File

@@ -233,7 +233,7 @@ class FieldTest {
@DisplayName("toWhere generates for inArray (PostgreSQL)")
fun toWhereInArrayPostgres() {
Configuration.connectionString = ":postgresql:"
assertEquals("data->'even' ?| ARRAY[:it_0, :it_1, :it_2, :it_3]",
assertEquals("data->'even' ??| ARRAY[:it_0, :it_1, :it_2, :it_3]",
Field.inArray("even", "tbl", listOf(2, 4, 6, 8), ":it").toWhere(),
"Field WHERE clause not generated correctly")
}

View File

@@ -61,7 +61,7 @@ class OpTest {
@Test
@DisplayName("IN_ARRAY uses proper SQL")
fun inArraySQL() {
assertEquals("?|", Op.IN_ARRAY.sql, "The SQL for in-array is incorrect")
assertEquals("??|", Op.IN_ARRAY.sql, "The SQL for in-array is incorrect")
}
@Test