Skip to content

Commit 042825a

Browse files
committed
Merge branch 'amend-cte' into bitwise-operators
2 parents dd2040e + caec85b commit 042825a

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

dev/eponymous_vtabs/dbstat.h

+5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "../schema/column.h"
88
#include "../schema/table.h"
9+
#include "../column_pointer.h"
910

1011
namespace sqlite_orm {
1112
#ifdef SQLITE_ENABLE_DBSTAT_VTAB
@@ -35,5 +36,9 @@ namespace sqlite_orm {
3536
make_column("pgoffset", &dbstat::pgoffset),
3637
make_column("pgsize", &dbstat::pgsize));
3738
}
39+
40+
#ifdef SQLITE_ORM_WITH_CPP20_ALIASES
41+
inline constexpr orm_table_reference auto dbstat_table = c<dbstat>();
42+
#endif
3843
#endif // SQLITE_ENABLE_DBSTAT_VTAB
3944
}

include/sqlite_orm/sqlite_orm.h

+6
Original file line numberDiff line numberDiff line change
@@ -23924,6 +23924,8 @@ namespace sqlite_orm {
2392423924

2392523925
// #include "../schema/table.h"
2392623926

23927+
// #include "../column_pointer.h"
23928+
2392723929
namespace sqlite_orm {
2392823930
#ifdef SQLITE_ENABLE_DBSTAT_VTAB
2392923931
struct dbstat {
@@ -23952,6 +23954,10 @@ namespace sqlite_orm {
2395223954
make_column("pgoffset", &dbstat::pgoffset),
2395323955
make_column("pgsize", &dbstat::pgsize));
2395423956
}
23957+
23958+
#ifdef SQLITE_ORM_WITH_CPP20_ALIASES
23959+
inline constexpr orm_table_reference auto dbstat_table = c<dbstat>();
23960+
#endif
2395523961
#endif // SQLITE_ENABLE_DBSTAT_VTAB
2395623962
}
2395723963

tests/builtin_tables.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ TEST_CASE("builtin tables") {
5050

5151
auto dbstatRows = storage.get_all<dbstat>();
5252
std::ignore = dbstatRows;
53+
54+
#ifdef SQLITE_ORM_WITH_CPP20_ALIASES
55+
dbstatRows = storage.get_all<dbstat_table>();
56+
#endif
5357
}
5458
#endif // SQLITE_ENABLE_DBSTAT_VTAB
5559
}

tests/prepared_statement_tests/get_all.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -217,8 +217,8 @@ TEST_CASE("Prepared get all") {
217217
}
218218
#ifdef SQLITE_ORM_WITH_CPP20_ALIASES
219219
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")));
222222
auto str = storage.dump(statement);
223223
testSerializing(statement);
224224
}

0 commit comments

Comments
 (0)