File tree 4 files changed +17
-2
lines changed
4 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 6
6
7
7
#include " ../schema/column.h"
8
8
#include " ../schema/table.h"
9
+ #include " ../column_pointer.h"
9
10
10
11
namespace sqlite_orm {
11
12
#ifdef SQLITE_ENABLE_DBSTAT_VTAB
@@ -35,5 +36,9 @@ namespace sqlite_orm {
35
36
make_column (" pgoffset" , &dbstat::pgoffset),
36
37
make_column (" pgsize" , &dbstat::pgsize));
37
38
}
39
+
40
+ #ifdef SQLITE_ORM_WITH_CPP20_ALIASES
41
+ inline constexpr orm_table_reference auto dbstat_table = c<dbstat>();
42
+ #endif
38
43
#endif // SQLITE_ENABLE_DBSTAT_VTAB
39
44
}
Original file line number Diff line number Diff line change @@ -23924,6 +23924,8 @@ namespace sqlite_orm {
23924
23924
23925
23925
// #include "../schema/table.h"
23926
23926
23927
+ // #include "../column_pointer.h"
23928
+
23927
23929
namespace sqlite_orm {
23928
23930
#ifdef SQLITE_ENABLE_DBSTAT_VTAB
23929
23931
struct dbstat {
@@ -23952,6 +23954,10 @@ namespace sqlite_orm {
23952
23954
make_column("pgoffset", &dbstat::pgoffset),
23953
23955
make_column("pgsize", &dbstat::pgsize));
23954
23956
}
23957
+
23958
+ #ifdef SQLITE_ORM_WITH_CPP20_ALIASES
23959
+ inline constexpr orm_table_reference auto dbstat_table = c<dbstat>();
23960
+ #endif
23955
23961
#endif // SQLITE_ENABLE_DBSTAT_VTAB
23956
23962
}
23957
23963
Original file line number Diff line number Diff line change @@ -50,6 +50,10 @@ TEST_CASE("builtin tables") {
50
50
51
51
auto dbstatRows = storage.get_all <dbstat>();
52
52
std::ignore = dbstatRows;
53
+
54
+ #ifdef SQLITE_ORM_WITH_CPP20_ALIASES
55
+ dbstatRows = storage.get_all <dbstat_table>();
56
+ #endif
53
57
}
54
58
#endif // SQLITE_ENABLE_DBSTAT_VTAB
55
59
}
Original file line number Diff line number Diff line change @@ -217,8 +217,8 @@ TEST_CASE("Prepared get all") {
217
217
}
218
218
#ifdef SQLITE_ORM_WITH_CPP20_ALIASES
219
219
SECTION (" from table reference" ) {
220
- constexpr auto schema = c<sqlite_master>();
221
- auto statement = storage.prepare (get_all<schema >(where (schema ->*&sqlite_master::type == " table" )));
220
+ auto statement =
221
+ storage.prepare (get_all<sqlite_master_table >(where (sqlite_master_table ->*&sqlite_master::type == " table" )));
222
222
auto str = storage.dump (statement);
223
223
testSerializing (statement);
224
224
}
You can’t perform that action at this time.
0 commit comments