WIP on execution / SQLite integration tests
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user