Skip to content

refactor(mdb): use safe conn.execute() for query#90

Merged
lewiszlw merged 2 commits into
masterfrom
refactor/mdb-query-safe-exec
Jun 22, 2026
Merged

refactor(mdb): use safe conn.execute() for query#90
lewiszlw merged 2 commits into
masterfrom
refactor/mdb-query-safe-exec

Conversation

@lewiszlw

Copy link
Copy Markdown
Member

Summary

Replace manual preallocate + unsafe exec_direct + unsafe CursorImpl::new in the MDB query path with odbc-api's safe conn.execute(&sql, (), None).

Changes

  • preallocate()into_handle()unsafe { exec_direct() }unsafe { CursorImpl::new() } (18 lines) → conn.execute(&sql, (), None) (9 lines)
  • bind_col workaround adapted to use cursor.as_stmt_ref()
  • Matches the infer_schema and DM connection patterns

lewiszlw added 2 commits June 22, 2026 13:48
…ec_direct

Replace the manual preallocate + unsafe exec_direct + unsafe CursorImpl::new
with odbc-api's safe conn.execute(&sql, (), None), matching the infer_schema
and DM connection patterns. The mdbtools dummy-column bind workaround remains
but is now threaded through cursor.as_stmt_ref().
@lewiszlw lewiszlw merged commit 7754e1b into master Jun 22, 2026
3 checks passed
@lewiszlw lewiszlw deleted the refactor/mdb-query-safe-exec branch June 22, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant