Closed rfx77 closed 3 years ago
Try this:
let mut builder = rsfbclient::builder_native()
.with_dyn_load("C:\\develop\\libs\\fb4\\fbclient.dll")
.with_embedded();
builder.db_name("c:\\temp\\test.fdb").user("SYSDBA");
let manager = FirebirdConnectionManager::new(builder);
let pool = Arc::new(r2d2::Pool::builder().max_size(4).build(manager).unwrap());
The builder is a bit awkward because there are some methods that consume the builder and others that take it by mutable reference. with_dyn_load
and with_embedded
take the builder and return a new one, but the other ones just modify the existing builder, so you need to store the builder in a mutable variable, then call the functions.
Hi!
I cannot compile the r2d2 sample with embedded db:
The Error is:
i am new to rust so i cannot figure out how to fix this.