@@ -117,7 +117,7 @@ function prepare_stmt_wrapper(db::DB, sql::AbstractString)
117117end
118118
119119"""
120- SQLite.Stmt(db, sql) => SQL.Stmt
120+ SQLite.Stmt(db, sql; register = true ) => SQL.Stmt
121121
122122Prepares an optimized internal representation of SQL statement in
123123the context of the provided SQLite3 `db` and constructs the `SQLite.Stmt`
@@ -127,15 +127,14 @@ Julia object that holds a reference to the prepared statement.
127127(mainly for usage where the same statement is executed multiple times
128128with different parameters bound as values).
129129
130- Internally `SQLite.Stmt` constructor creates the [`SQLite._Stmt`](@ref) object that is managed by `db`.
131- `SQLite.Stmt` references the `SQLite._Stmt` by its unique id.
132-
133130The `SQLite.Stmt` will be automatically closed/shutdown when it goes out of scope
134131(i.e. the end of the Julia session, end of a function call wherein it was created, etc.).
135132One can also call `DBInterface.close!(stmt)` to immediately close it.
136133
137- All prepared statements of a given DB connection are also automatically closed when the
138- DB is disconnected or when [`SQLite.finalize_statements!`](@ref) is explicitly called.
134+ The keyword argument `register` controls whether the created `Stmt` is registered in the
135+ provided SQLite3 database `db`. All registered and unclosed statements of a given DB
136+ connection are automatically closed when the DB is garbage collected or closed explicitly
137+ after calling `close(db)` or `DBInterface.close!(db)`.
139138"""
140139mutable struct Stmt <: DBInterface.Statement
141140 db:: DB
0 commit comments