tiberius icon indicating copy to clipboard operation
tiberius copied to clipboard

impl IntoSql<'a> in the .bind() method

Open TheRustifyer opened this issue 3 years ago • 1 comments

Hello. I am having issues with the .bind() method.

Currently, it's signature is pub fn bind(&mut self, param: impl IntoSql<'a> + 'a). I am mixing code from other database crates, and usually, parameters are accepted as &'a[&'a dyn Trait], so I can mix type parameters that implement Trait.

There's something similar in tiberius? Even if not, is possible to upgrade the codebase to accept something similar?

Thanks.

TheRustifyer avatar Sep 18 '22 12:09 TheRustifyer

Hey!

Could the direct client methods work for you better?

  • https://docs.rs/tiberius/0.11.0/tiberius/struct.Client.html#method.query
  • https://docs.rs/tiberius/0.11.0/tiberius/struct.Client.html#method.execute

pimeys avatar Sep 19 '22 16:09 pimeys