We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13e9c2c commit 6fcd6c9Copy full SHA for 6fcd6c9
mysql-async/src/main/scala/com/github/mauricio/async/db/mysql/MySQLConnection.scala
@@ -234,7 +234,7 @@ class MySQLConnection(
234
235
def sendPreparedStatement(query: String, values: Seq[Any]): Future[QueryResult] = {
236
this.validateIsReadyForQuery()
237
- val totalParameters = query.foldLeft(0) { (acc, c) => if ( c == '?' ) acc + 1 else acc }
+ val totalParameters = query.count( _ == '?')
238
if ( values.length != totalParameters ) {
239
throw new InsufficientParametersException(totalParameters, values)
240
}
0 commit comments