Skip to content

Commit e041fb4

Browse files
committed
Fixed syncing eponymous virtual table dbstat
1 parent 8b0704e commit e041fb4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

dev/implementations/storage_definitions.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <algorithm> // std::find_if, std::ranges::find
1010

1111
#include "../dbstat.h"
12+
#include "../type_traits.h"
1213
#include "../util.h"
1314
#include "../serializing_util.h"
1415
#include "../storage.h"
@@ -20,7 +21,7 @@ namespace sqlite_orm {
2021
template<class Table, satisfies<is_table, Table>>
2122
sync_schema_result storage_t<DBO...>::sync_table(const Table& table, sqlite3* db, bool preserve) {
2223
#ifdef SQLITE_ENABLE_DBSTAT_VTAB
23-
if(std::is_same<Table, dbstat>::value) {
24+
if(std::is_same<object_type_t<Table>, dbstat>::value) {
2425
return sync_schema_result::already_in_sync;
2526
}
2627
#endif // SQLITE_ENABLE_DBSTAT_VTAB

include/sqlite_orm/sqlite_orm.h

+3-5
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,6 @@ using std::nullptr_t;
137137
#define SQLITE_ORM_BROKEN_NONTEMPLATE_CONCEPTS
138138
#endif
139139

140-
#if SQLITE_ORM_HAS_INCLUDE(<version>)
141-
#include <version>
142-
#endif
143-
144140
#ifdef SQLITE_ORM_INLINE_VARIABLES_SUPPORTED
145141
#define SQLITE_ORM_INLINE_VAR inline
146142
#else
@@ -19364,6 +19360,8 @@ namespace sqlite_orm {
1936419360

1936519361
// #include "../dbstat.h"
1936619362

19363+
// #include "../type_traits.h"
19364+
1936719365
// #include "../util.h"
1936819366

1936919367
// #include "../serializing_util.h"
@@ -19377,7 +19375,7 @@ namespace sqlite_orm {
1937719375
template<class Table, satisfies<is_table, Table>>
1937819376
sync_schema_result storage_t<DBO...>::sync_table(const Table& table, sqlite3* db, bool preserve) {
1937919377
#ifdef SQLITE_ENABLE_DBSTAT_VTAB
19380-
if(std::is_same<Table, dbstat>::value) {
19378+
if(std::is_same<object_type_t<Table>, dbstat>::value) {
1938119379
return sync_schema_result::already_in_sync;
1938219380
}
1938319381
#endif // SQLITE_ENABLE_DBSTAT_VTAB

0 commit comments

Comments
 (0)