WIP on execution / SQLite integration tests

This commit is contained in:
2025-02-23 22:11:06 -05:00
parent 93f4700613
commit 7f3392f004
16 changed files with 583 additions and 57 deletions

View File

@@ -29,6 +29,16 @@ object Parameters {
}
}
/**
* Create a parameter by encoding a JSON object
*
* @param name The parameter name
* @param value The object to be encoded as JSON
* @return A parameter with the value encoded
*/
inline fun <reified T> json(name: String, value: T) =
Parameter(name, ParameterType.JSON, Configuration.json.encodeToString(value))
/**
* Replace the parameter names in the query with question marks
*
@@ -93,7 +103,7 @@ object Parameters {
}
}
ParameterType.JSON -> stmt.setString(idx, Configuration.json.encodeToString(param.value))
ParameterType.JSON -> stmt.setString(idx, param.value as String)
}
}
}