diff --git a/src/main/java/com/aerospike/jdbc/AerospikeStatement.java b/src/main/java/com/aerospike/jdbc/AerospikeStatement.java index c8ef91e..aefcd86 100644 --- a/src/main/java/com/aerospike/jdbc/AerospikeStatement.java +++ b/src/main/java/com/aerospike/jdbc/AerospikeStatement.java @@ -14,7 +14,7 @@ import java.sql.SQLFeatureNotSupportedException; import java.sql.SQLWarning; import java.sql.Statement; -import java.util.Collection; +import java.util.List; import java.util.logging.Logger; import static java.lang.String.format; @@ -60,7 +60,7 @@ protected void runQuery(AerospikeQuery query) { updateCount = result.getRight(); } - protected AerospikeQuery parseQuery(String sql, Collection sqlParameters) throws SQLException { + protected AerospikeQuery parseQuery(String sql, List sqlParameters) throws SQLException { sql = sql.replace("\n", " "); AerospikeQuery query; try { diff --git a/src/main/java/com/aerospike/jdbc/model/AerospikeQuery.java b/src/main/java/com/aerospike/jdbc/model/AerospikeQuery.java index bb6e5fc..bf36379 100644 --- a/src/main/java/com/aerospike/jdbc/model/AerospikeQuery.java +++ b/src/main/java/com/aerospike/jdbc/model/AerospikeQuery.java @@ -45,7 +45,7 @@ public AerospikeQuery() { this.queryType = QueryType.UNKNOWN; } - public static AerospikeQuery parse(String sql, Collection sqlParameters) throws SqlParseException { + public static AerospikeQuery parse(String sql, List sqlParameters) throws SqlParseException { SqlParser parser = SqlParser.create(sql, sqlParserConfig); SqlNode parsed = parser.parseQuery(); return parsed.accept(new AerospikeSqlVisitor(sqlParameters)); diff --git a/src/main/java/com/aerospike/jdbc/model/AerospikeSqlVisitor.java b/src/main/java/com/aerospike/jdbc/model/AerospikeSqlVisitor.java index 93732db..3ad1d20 100644 --- a/src/main/java/com/aerospike/jdbc/model/AerospikeSqlVisitor.java +++ b/src/main/java/com/aerospike/jdbc/model/AerospikeSqlVisitor.java @@ -12,8 +12,8 @@ import javax.annotation.Nullable; import java.math.BigDecimal; -import java.util.Collection; import java.util.Iterator; +import java.util.List; import java.util.stream.Collectors; import static com.aerospike.jdbc.util.Constants.UNSUPPORTED_QUERY_TYPE_MESSAGE; @@ -31,7 +31,7 @@ public AerospikeSqlVisitor() { this(null); } - public AerospikeSqlVisitor(@Nullable Collection sqlParameters) { + public AerospikeSqlVisitor(@Nullable List sqlParameters) { query = new AerospikeQuery(); sqlParametersIterator = sqlParameters != null ? sqlParameters.iterator() : null; }