You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-9Lines changed: 16 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,7 +78,7 @@ int main() {
78
78
```
79
79
80
80
Prepared Statements
81
-
=====
81
+
----
82
82
It is possible to retain and reuse statments this will keep the query plan and in case of an complex query or many uses might increase the performance significantly.
83
83
84
84
```c++
@@ -121,7 +121,7 @@ It is possible to retain and reuse statments this will keep the query plan and i
121
121
```
122
122
123
123
Shared Connections
124
-
=====
124
+
----
125
125
If you need the handle to the database connection to execute sqlite3 commands directly you can get a managed shared_ptr to it, so it will not close as long as you have a referenc to it.
126
126
127
127
Take this example on how to deal with a database backup using SQLITEs own functions in a save and modern way.
@@ -151,7 +151,7 @@ Take this example on how to deal with a database backup using SQLITEs own functi
151
151
```
152
152
153
153
Transactions
154
-
=====
154
+
----
155
155
You can use transactions with `begin;`, `commit;` and `rollback;` commands.
156
156
157
157
```c++
@@ -176,7 +176,7 @@ You can use transactions with `begin;`, `commit;` and `rollback;` commands.
176
176
```
177
177
178
178
Blob
179
-
=====
179
+
----
180
180
Use `std::vector<T>` to store and retrieve blob data.
181
181
`T` could be `char,short,int,long,long long, float or double`.
182
182
@@ -194,7 +194,7 @@ Use `std::vector<T>` to store and retrieve blob data.
194
194
```
195
195
196
196
NULL values
197
-
=====
197
+
----
198
198
If you have databases where some rows may be null, you can use `std::unique_ptr<T>` to retain the NULL values between C++ variables and the database.
199
199
200
200
```c++
@@ -225,7 +225,7 @@ db << "select age,name,img from tbl where id = 2"
225
225
```
226
226
227
227
NULL values (DEPRICATED)
228
-
=====
228
+
----
229
229
**Note: this option is deprecated and will be removed in future versions.**
230
230
You can enable boost support by defining _MODERN_SQLITE_BOOST_OPTIONAL_SUPPORT before importing sqlite_modern_cpp header.
231
231
@@ -281,7 +281,7 @@ You can enable boost support by defining _MODERN_SQLITE_BOOST_OPTIONAL_SUPPORT b
281
281
```
282
282
283
283
Errors
284
-
=====
284
+
----
285
285
286
286
On error, the library throws an error class indicating the type of error. The error classes are derived from the SQLITE3 error names, so if the error code is SQLITE_CONSTRAINT, the error class thrown is sqlite::exceptions::constraint. Note that all errors are derived from sqlite::sqlite_exception and that itself is derived from std::runtime_exception.
287
287
@@ -304,12 +304,12 @@ On error, the library throws an error class indicating the type of error. The er
304
304
```
305
305
306
306
NDK support
307
-
======
307
+
----
308
308
Just Make sure you are using the full path of your database file :
0 commit comments