Skip to content

Commit

Permalink
Merge pull request #64 from akoshchiy/bug/240820-build-fix
Browse files Browse the repository at this point in the history
build fix
  • Loading branch information
Mause authored Aug 20, 2024
2 parents db056f1 + 66f89dd commit 83521ad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/jni/duckdb_java.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,8 @@ jobject _duckdb_jdbc_execute(JNIEnv *env, jclass, jobject stmt_ref_buf, jobjectA
duckdb::vector<Value> duckdb_params;

idx_t param_len = env->GetArrayLength(params);
if (param_len != stmt_ref->stmt->n_param) {

if (param_len != stmt_ref->stmt->named_param_map.size()) {
throw InvalidInputException("Parameter count mismatch");
}

Expand Down Expand Up @@ -827,8 +828,9 @@ jobject _duckdb_jdbc_prepared_statement_meta(JNIEnv *env, jclass, jobject stmt_r
}

auto &stmt = stmt_ref->stmt;
auto n_param = stmt->named_param_map.size();

return build_meta(env, stmt->ColumnCount(), stmt->n_param, stmt->GetNames(), stmt->GetTypes(),
return build_meta(env, stmt->ColumnCount(), n_param, stmt->GetNames(), stmt->GetTypes(),
stmt->GetStatementProperties());
}

Expand Down

0 comments on commit 83521ad

Please sign in to comment.