WIP on query tests
This commit is contained in:
@@ -21,7 +21,11 @@ object Parameters {
|
||||
fun nameFields(fields: Collection<Field<*>>): Collection<Field<*>> {
|
||||
val name = ParameterName()
|
||||
return fields.map {
|
||||
if (it.name.isBlank()) it.withParameterName(name.derive(null)) else it
|
||||
if (it.parameterName.isNullOrEmpty() && !listOf(Op.EXISTS, Op.NOT_EXISTS).contains(it.comparison.op)) {
|
||||
it.withParameterName(name.derive(null))
|
||||
} else {
|
||||
it
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -75,7 +79,8 @@ object Parameters {
|
||||
is Int -> stmt.setInt(idx, param.value)
|
||||
is Long -> stmt.setLong(idx, param.value)
|
||||
else -> throw DocumentException(
|
||||
"Number parameter must be Byte, Short, Int, or Long (${param.value::class.simpleName})")
|
||||
"Number parameter must be Byte, Short, Int, or Long " +
|
||||
"(${param.value::class.simpleName})")
|
||||
}
|
||||
}
|
||||
ParameterType.STRING -> {
|
||||
|
||||
Reference in New Issue
Block a user