Skip to content

Commit 318bcd1

Browse files
committed
PSTGRSCROC-152
1 parent 2953a8c commit 318bcd1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/kotlin/com/github/mgramin/sqlboot/model/resourcetype/impl/SqlResourceType.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class SqlResourceType(
105105

106106
override fun metaData(uri: Uri): List<Metadata> {
107107
val endpoint = endpoints
108-
.filter { it.properties().containsKey("tags") && it.properties()["tags"] == "history" }
108+
.filter { it.properties().containsKey("tags") && it.properties()["tags"].toString().contains("history") }
109109
.ifEmpty { endpoints.filter { it.properties().containsKey("default") } }
110110
.ifEmpty { endpoints }
111111
.first()

src/main/kotlin/com/github/mgramin/sqlboot/sql/select/wrappers/CustomFilteredSelectQuery.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class CustomFilteredSelectQuery(
5454
"int8" -> """${it.key} = ${it.value.asBigInteger}"""
5555
"varchar","text","name" -> """${it.key} like '${it.value.asString.replace("'", "''")}'"""
5656
"timestamptz" -> """${it.key} between '${it.value.asJsonObject["start"].asString}'::timestamptz and '${it.value.asJsonObject["end"].asString}'::timestamptz"""
57-
else -> """${it.key} = '${it.value.asString.replace("'", "''")}'"""
57+
else -> """${it.key} = '${it.value.toString().replace("'", "''")}'"""
5858
}
5959
}
6060
"""select *

0 commit comments

Comments
 (0)