Skip to main content
Spelling and grammar
Source Link
Toby Speight
  • 88.7k
  • 14
  • 104
  • 327

AuthorI am the author of the odbc-api Rust ODBC bindings here.

I would suggest returning a reference to an environment with a static lifetime from environment_pooling_mssql. Similarly Connection<'a> could then become `Connection<'static>Connection<'static>.

To tackle your actual question about what needs to be sendsent between threads. Short answer: Nothing. The ODBC driver manager now does connection pooling behind the scenes. Your application just always "creates" new connections. IfWhether the connection is truly created or just reused is for the driver manager to decide. Apart from specifying it during the creation of the ODBC Environment y.

Author of the odbc-api Rust ODBC bindings here.

I would suggest returning a reference to an environment with a static lifetime from environment_pooling_mssql. Similarly Connection<'a> could then become `Connection<'static>.

To tackle your actual question about what needs to be send between threads. Short answer: Nothing. The ODBC driver manager now does connection pooling behind the scenes. Your application just always "creates" new connections. If the connection is truly created or just reused is for the driver manager to decide. Apart from specifying it during the creation of the ODBC Environment y

I am the author of the odbc-api Rust ODBC bindings.

I would suggest returning a reference to an environment with a static lifetime from environment_pooling_mssql. Similarly Connection<'a> could then become Connection<'static>.

To tackle your actual question about what needs to be sent between threads. Short answer: Nothing. The ODBC driver manager now does connection pooling behind the scenes. Your application just always "creates" new connections. Whether the connection is truly created or just reused is for the driver manager to decide. Apart from specifying it during the creation of the ODBC Environment.

Source Link

Author of the odbc-api Rust ODBC bindings here.

I would suggest returning a reference to an environment with a static lifetime from environment_pooling_mssql. Similarly Connection<'a> could then become `Connection<'static>.

To tackle your actual question about what needs to be send between threads. Short answer: Nothing. The ODBC driver manager now does connection pooling behind the scenes. Your application just always "creates" new connections. If the connection is truly created or just reused is for the driver manager to decide. Apart from specifying it during the creation of the ODBC Environment y