File tree Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Expand file tree Collapse file tree 3 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -228,6 +228,8 @@ namespace sqlite_orm {
228228
229229 /*
230230 Acquires a database connection upon construction and releases it upon destruction.
231+
232+ Note: It is important to cache the `sqlite3*` pointer for cache-friendliness (thus avoiding to access the holder on each `get()` call).
231233 */
232234 struct connection_ref {
233235 connection_ref (connection_holder& holder) : holder{&holder}, db{holder.retain ()} {}
@@ -259,6 +261,8 @@ namespace sqlite_orm {
259261
260262 /*
261263 Increases the reference count of an existing open connection upon construction and releases it upon destruction.
264+
265+ Note: It is important to cache the `sqlite3*` pointer for cache-friendliness (thus avoiding to access the holder on each `get()` call).
262266 */
263267 struct connection_ptr {
264268 connection_ptr (connection_holder& holder) : holder{&holder}, db{holder.retain_if_open ()} {}
Original file line number Diff line number Diff line change @@ -13,4 +13,4 @@ namespace sqlite_orm::internal {
1313
1414 F f;
1515 };
16- }
16+ }
Original file line number Diff line number Diff line change @@ -14514,6 +14514,7 @@ namespace sqlite_orm::internal {
1451414514 F f;
1451514515 };
1451614516}
14517+
1451714518// #include "functional/gsl.h"
1451814519
1451914520// #include "error_code.h"
@@ -14851,6 +14852,8 @@ namespace sqlite_orm {
1485114852
1485214853 /*
1485314854 Acquires a database connection upon construction and releases it upon destruction.
14855+
14856+ Note: It is important to cache the `sqlite3*` pointer for cache-friendliness (thus avoiding to access the holder on each `get()` call).
1485414857 */
1485514858 struct connection_ref {
1485614859 connection_ref(connection_holder& holder) : holder{&holder}, db{holder.retain()} {}
@@ -14882,6 +14885,8 @@ namespace sqlite_orm {
1488214885
1488314886 /*
1488414887 Increases the reference count of an existing open connection upon construction and releases it upon destruction.
14888+
14889+ Note: It is important to cache the `sqlite3*` pointer for cache-friendliness (thus avoiding to access the holder on each `get()` call).
1488514890 */
1488614891 struct connection_ptr {
1488714892 connection_ptr(connection_holder& holder) : holder{&holder}, db{holder.retain_if_open()} {}
You can’t perform that action at this time.
0 commit comments