Add more tests

remove "sendQuery" on function
sendQuery now return QueryResult
remove null on queryError message
This commit is contained in:
2021-07-18 01:19:27 +02:00
parent 35d43abc4b
commit a4a4ef5f6f
10 changed files with 116 additions and 78 deletions

View File

@@ -76,10 +76,14 @@ class Query(override val name: String, private val sql: String, override val con
/**
* Warning: this method not use prepared statement
*/
override fun sendQuery(values: List<Any?>): Int = connection.sendQuery(sql, values)
fun sendQuery(values: List<Any?>): QueryResult = connection.sendQuery(sql, values)
/**
* Warning: this method not use prepared statement
*/
override fun sendQuery(values: Map<String, Any?>): Int = connection.sendQuery(sql, values)
fun sendQuery(values: Map<String, Any?>): QueryResult = connection.sendQuery(sql, values)
/**
* Warning: this method not use prepared statement
*/
fun sendQuery(vararg values: Pair<String, Any?>): QueryResult = sendQuery(values.toMap())
}