Skip to content

Instantly share code, notes, and snippets.

@gwenn
Last active December 20, 2023 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gwenn/a13530df94598c0cec8d2f0e3b82e543 to your computer and use it in GitHub Desktop.
Save gwenn/a13530df94598c0cec8d2f0e3b82e543 to your computer and use it in GitHub Desktop.

https://docs.rs/odbc-api/latest/src/odbc_api/cursor.rs.html#260-263

pub struct CursorImpl<Stmt: AsStatementRef> {
    /// A statement handle in cursor mode.
    statement: Stmt,
}

https://docs.rs/odbc-api/latest/src/odbc_api/prepared.rs.html#10-12

pub struct Prepared<S> {
    statement: S,
}

https://docs.rs/odbc-api/latest/src/odbc_api/statement_connection.rs.html#9-12

/// Statement handle which also takes ownership of Connection
pub struct StatementConnection<'env> {
    handle: HStmt,
    _parent: Connection<'env>,
}

(we don't want this because I guess only one statement at a time)

https://docs.rs/tokio-postgres/0.7.10/src/tokio_postgres/statement.rs.html#35

/// Prepared statements can only be used with the connection that created them.
pub struct Statement(Arc<StatementInner>);

(we don't need an Arc for rusqlite because connection are not Sync)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment