Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rust: constructors w/o opts are ignored #2241

Closed
tokoko opened this issue Oct 10, 2024 · 0 comments · Fixed by #2242
Closed

Rust: constructors w/o opts are ignored #2241

tokoko opened this issue Oct 10, 2024 · 0 comments · Fixed by #2242
Labels
Type: bug Something isn't working

Comments

@tokoko
Copy link
Contributor

tokoko commented Oct 10, 2024

What happened?

Driver trait has two methods new_database and new_database_with_opts, but new_database is always ignored by ManagedDriver. instead of forwarding the call to the inner driver's new_database method, it invokes new_database_with_opts(None).

This is almost always desirable behavior, but it can be confusing when you're getting not yet implemented error calling new_database even if you have new_database implemented.

P.S. pretty sure the same applies to other objects as well (Database, Connection..)

Stack Trace

No response

How can we reproduce the bug?

This fails if new_database_with_opts is not implemented.

let mut driver = ManagedDriver::load_dynamic_from_name(
        "adbc_dummy",
        Some(b"DummyDriverInit"),
        AdbcVersion::V110,
    ).unwrap();

let mut database = driver.new_database().unwrap();

Environment/Setup

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant