StdLib deprecations cleanup: *array -> *arrayOf, copyToArray -> toTypedArray.

This commit is contained in:
Ilya Gorbunov
2015-06-25 17:33:35 +03:00
parent c462d23a0e
commit 00a44f6d4f
12 changed files with 37 additions and 39 deletions
@@ -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())
}