Skip to content

Commit d9c8182

Browse files
committed
Updated view.h
1 parent f84a9d9 commit d9c8182

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

dev/functional/meta_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#ifndef SQLITE_ORM_IMPORT_STD_MODULE
44
#ifdef SQLITE_ORM_REFLECTION_SUPPORTED
55
#include <meta> // std::meta::access_context, std::meta::nonstatic_data_members_of, std::meta::identifier_of
6-
#include <tuple> // std::tuple, std::get
6+
#include <tuple> // std::tuple
77
#include <utility> // std::index_sequence, std::make_index_sequence
88
#endif
99
#endif

dev/schema/view.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ namespace sqlite_orm::internal {
9393
#ifdef SQLITE_ORM_WITH_VIEW
9494
#ifdef SQLITE_ORM_REFLECTION_SUPPORTED
9595
namespace sqlite_orm::internal {
96-
template<class O, class Select, std::size_t... I>
96+
template<class O, class Select, size_t... I>
9797
auto make_view(std::string name, std::index_sequence<I...>, Select select) {
9898
constexpr auto memberNames = extract_member_names<O>();
9999
constexpr auto memberPointers = extract_member_pointers<O>();
@@ -110,6 +110,12 @@ namespace sqlite_orm::internal {
110110
}
111111

112112
SQLITE_ORM_EXPORT namespace sqlite_orm {
113+
/**
114+
* Factory function for a view definition.
115+
*
116+
* The mapped object type is explicitly specified, columns and their names are deferred from the object type.
117+
* The object type must be an aggregate.
118+
*/
113119
template<class O, class Select>
114120
requires (internal::is_select_expression_v<Select>)
115121
auto make_view(std::string name, Select select) {

0 commit comments

Comments
 (0)