mirror of
https://github.com/isar/rusqlite.git
synced 2025-03-31 19:12:58 +08:00
Owning statement caveat
This commit is contained in:
parent
05699d38ce
commit
ee17272a04
@ -2,6 +2,9 @@ extern crate rusqlite;
|
|||||||
use ouroboros::self_referencing;
|
use ouroboros::self_referencing;
|
||||||
use rusqlite::{CachedStatement, Connection, Result, Rows};
|
use rusqlite::{CachedStatement, Connection, Result, Rows};
|
||||||
|
|
||||||
|
/// Caveat: single statement at a time for one connection.
|
||||||
|
/// But if you need multiple statements, you can still create your own struct
|
||||||
|
/// with multiple fields (one for each statement).
|
||||||
#[self_referencing]
|
#[self_referencing]
|
||||||
struct OwningStatement {
|
struct OwningStatement {
|
||||||
conn: Connection,
|
conn: Connection,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user