StdLib deprecations cleanup: *array -> *arrayOf, copyToArray -> toTypedArray.
This commit is contained in:
@@ -18,14 +18,14 @@ class JdbcTemplateTest {
|
||||
|
||||
// TODO will use a tuple soon
|
||||
dataSource.update(
|
||||
StringTemplate(array("insert into foo (id, name) values (", id, ", ", name, ")"))
|
||||
StringTemplate(arrayOf("insert into foo (id, name) values (", id, ", ", name, ")"))
|
||||
)
|
||||
|
||||
// Mimicks
|
||||
// datasource.query("select * from foo where id = $id") { it.map{ it["name"] } }
|
||||
|
||||
val names = dataSource.query(
|
||||
StringTemplate(array("select * from foo where id = ", id))
|
||||
StringTemplate(arrayOf("select * from foo where id = ", id))
|
||||
) {
|
||||
it.map{ it["name"] }.toList()
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class JdbcTest {
|
||||
}
|
||||
|
||||
test fun stringFormat() {
|
||||
dataSource.query(kotlin.template.StringTemplate(array("select * from foo where id = ", 1))) {
|
||||
dataSource.query(kotlin.template.StringTemplate(arrayOf("select * from foo where id = ", 1))) {
|
||||
for (row in it) {
|
||||
println(row.getValuesAsMap())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user