@@ -13953,14 +13953,27 @@ namespace sqlite_orm::internal {
1395313953}
1395413954
1395513955SQLITE_ORM_EXPORT namespace sqlite_orm {
13956+ inline namespace literals {
13957+ /**
13958+ * Database object name annotation factory.
13959+ * Use as a class-scope annotation:
13960+ * `struct [[="users"_dbo_name]] User { ... };`
13961+ * `struct [[= sqlite_orm::operator""_dbo_name<"users">()]] User { ... };`
13962+ * `make_view<T>()` consumes this annotation.
13963+ */
13964+ template<internal::dbo_name_literal dboName>
13965+ [[nodiscard]] consteval auto operator""_dbo_name() {
13966+ return dboName;
13967+ }
13968+ }
13969+
1395613970 /**
1395713971 * Database object name annotation factory.
1395813972 * Use as a class-scope annotation: `struct [[=dbo_name("users")]] User { ... };`.
13959- * Both `make_table<T>()` and `make_view<T>()` consume this annotation; when absent
13960- * the name falls back to `T`'s reflected identifier.
13973+ * `make_view<T>()` consumes this annotation.
1396113974 */
1396213975 template<size_t N>
13963- constexpr internal::dbo_name_literal<N> dbo_name(const char (&dboName)[N]) {
13976+ consteval internal::dbo_name_literal<N> dbo_name(const char (&dboName)[N]) {
1396413977 return {dboName};
1396513978 }
1396613979}
@@ -13982,10 +13995,10 @@ namespace sqlite_orm::internal {
1398213995 };
1398313996
1398413997 template<class T>
13985- inline constexpr bool is_view_v = polyfill::is_specialization_of_v<T, query_view>;
13998+ constexpr bool is_view_v = polyfill::is_specialization_of_v<T, query_view>;
1398613999#else
1398714000 template<class T>
13988- inline constexpr bool is_view_v = false;
14001+ constexpr bool is_view_v = false;
1398914002#endif
1399014003
1399114004 template<class T>
@@ -14020,7 +14033,7 @@ SQLITE_ORM_EXPORT namespace sqlite_orm {
1402014033 * Factory function for a view definition.
1402114034 *
1402214035 * The mapped object type is explicitly specified, columns and their names are deferred from the object type.
14023- * The object type must be an aggregate. The optional `[[=dbo_name( "…") ]]` class-scope annotation overrides
14036+ * The object type must be an aggregate. The optional `[[="…"_dbo_name ]]` class-scope annotation overrides
1402414037 * the view name (otherwise the type's reflected identifier is used).
1402514038 */
1402614039 template<class O, class Select>
@@ -14039,7 +14052,7 @@ SQLITE_ORM_EXPORT namespace sqlite_orm {
1403914052 * Factory function for a view definition.
1404014053 *
1404114054 * The mapped object type is explicitly specified, columns and their names are deferred from the object type.
14042- * The object type must be an aggregate. The optional `[[=dbo_name( "…") ]]` class-scope annotation overrides
14055+ * The object type must be an aggregate. The optional `[[="…"_dbo_name ]]` class-scope annotation overrides
1404314056 * the view name (otherwise the type's reflected identifier is used).
1404414057 */
1404514058 template<orm_table_reference auto table, class Select>
0 commit comments