-
-
Notifications
You must be signed in to change notification settings - Fork 321
internal::storage_t
Yevgeniy Zakharov edited this page Oct 13, 2021
·
2 revisions
namespace sqlite_orm {
namespace internal {
template<class ...Ts>
struct storage_t;
}
}
Basic class used for interacting with sqlite database engine (libsqlite3). You do not have to create it explicitly with its constructor. Instead please use make_storage function.
-
get -
SELECT * FROM
by primary key -
get_no_throw -
SELECT * FROM
by primary key without throwing an exception in not found case -
update -
UPDATE
by primary key -
remove -
DELETE * FROM
by primary key -
replace -
INSERT OR REPLACE
by primary key -
replace_range -
INSERT OR REPLACE
by primary key multiple rows within single query
-
insert -
INSERT INTO table (...) VALUES (...)
-
insert_range -
INSERT INTO table (...) VALUES (...), (...), (...) ...
-
update_all -
UPDATE
without primary key -
get_all -
SELECT * FROM
with or without conditions -
select -
SELECT column FROM
with or without conditions -
remove_all -
DELETE * FROM
with or without conditions
-
count -
SELECT COUNT(*) FROM
andSELECT COUNT(column) FROM
-
avg -
SELECT AVG(column) FROM
-
group_concat -
SELECT GROUP_CONCAT(column) FROM
-
max -
SELECT MAX(column) FROM
-
min -
SELECT MIN(column) FROM
-
sum -
SELECT SUM(column) FROM
-
total -
SELECT TOTAL(column) FROM
- dump - Create a string representation of an object
-
drop_table -
DROP TABLE table
-
changes -
sqlite3_changes()
-
total_changes -
sqlite3_total_changes()
- sync_schema - Check db schema equality and fix if something is wrong
-
sync_schema_simulate - Returns the same result as
sync_schema
does but doesn't perform any changes in the db -
current_timestamp -
SELECT CURRENT_TIMESTAMP
-
last_insert_rowid -
last_insert_rowid()
- iterate - Get STL compatible container
-
table_names - Get
std::vector<std::string>
of actual table names in database - open_forever - Open database connection and never close it. Useful for multithreaded access
- transaction - Implicit transaction with a lambda
-
begin_transaction -
BEGIN TRANSACTION
-
commit -
COMMIT
-
rollback -
ROLLBACK
- transaction_guard - Guard class that begins a transaction and rollbacks/commits it on destroy
-
user_version -
PRAGMA user_version
-
synchronous -
PRAGMA synchronous