@@ -5540,24 +5540,6 @@ namespace sqlite_orm::internal {
55405540 }
55415541 };
55425542
5543- struct is_not_null_string {
5544- operator std::string() const {
5545- return "IS NOT NULL";
5546- }
5547- };
5548-
5549- /**
5550- * IS NOT NULL operator object.
5551- */
5552- template<class T>
5553- struct is_not_null_t : condition_t, is_not_null_string, negatable_t {
5554- using self = is_not_null_t<T>;
5555-
5556- T t;
5557-
5558- is_not_null_t(T t_) : t(std::move(t_)) {}
5559- };
5560-
55615543 struct order_by_base {
55625544 std::string _collate_argument;
55635545 int _order = 0; // -1 = desc, 1 = asc, 0 = unspecified
@@ -6152,11 +6134,6 @@ SQLITE_ORM_EXPORT namespace sqlite_orm {
61526134 get_from_expression(std::forward<R>(r))};
61536135 }
61546136
6155- template<class T>
6156- internal::is_not_null_t<T> is_not_null(T t) {
6157- return {std::move(t)};
6158- }
6159-
61606137 template<class L, class R>
61616138 constexpr internal::is_equal_t<L, R> is_equal(L l, R r) {
61626139 return {std::move(l), std::move(r)};
@@ -12106,6 +12083,41 @@ SQLITE_ORM_EXPORT namespace sqlite_orm {
1210612083 return {std::move(t)};
1210712084 }
1210812085}
12086+ // #include "ast/is_not_null.h"
12087+
12088+ #ifndef SQLITE_ORM_IMPORT_STD_MODULE
12089+ #include <utility> // std::move
12090+ #endif
12091+
12092+ // #include "../tags.h"
12093+
12094+ // #include "../functional/config.h"
12095+
12096+ namespace sqlite_orm::internal {
12097+ /**
12098+ * IS NOT NULL operator object.
12099+ */
12100+ template<class T>
12101+ struct is_not_null_t : condition_t, negatable_t {
12102+ using argument_type = T;
12103+ using self = is_not_null_t<argument_type>;
12104+
12105+ argument_type argument;
12106+
12107+ is_not_null_t(argument_type argument_) : argument(std::move(argument_)) {}
12108+ };
12109+ }
12110+
12111+ SQLITE_ORM_EXPORT namespace sqlite_orm {
12112+
12113+ /**
12114+ * IS NOT NULL operator.
12115+ */
12116+ template<class T>
12117+ internal::is_not_null_t<T> is_not_null(T t) {
12118+ return {std::move(t)};
12119+ }
12120+ }
1210912121
1211012122namespace sqlite_orm::internal {
1211112123 /**
@@ -16275,6 +16287,10 @@ SQLITE_ORM_EXPORT namespace sqlite_orm {
1627516287
1627616288// #include "ast/between.h"
1627716289
16290+ // #include "ast/is_null.h"
16291+
16292+ // #include "ast/is_not_null.h"
16293+
1627816294namespace sqlite_orm::internal {
1627916295 /**
1628016296 * ast_iterator accepts any expression and a callable object
@@ -16775,8 +16791,8 @@ namespace sqlite_orm::internal {
1677516791 using node_type = is_not_null_t<T>;
1677616792
1677716793 template<class L>
16778- SQLITE_ORM_STATIC_CALLOP void operator()(const node_type& i , L& lambda) SQLITE_ORM_OR_CONST_CALLOP {
16779- iterate_ast(i.t , lambda);
16794+ SQLITE_ORM_STATIC_CALLOP void operator()(const node_type& node , L& lambda) SQLITE_ORM_OR_CONST_CALLOP {
16795+ iterate_ast(node.argument , lambda);
1678016796 }
1678116797 };
1678216798
@@ -20100,6 +20116,10 @@ SQLITE_ORM_EXPORT namespace sqlite_orm {
2010020116
2010120117// #include "ast/limit.h"
2010220118
20119+ // #include "ast/is_null.h"
20120+
20121+ // #include "ast/is_not_null.h"
20122+
2010320123// #include "core_functions.h"
2010420124
2010520125// #include "constraints.h"
@@ -21770,10 +21790,10 @@ namespace sqlite_orm::internal {
2177021790 using statement_type = is_not_null_t<T>;
2177121791
2177221792 template<class Ctx>
21773- SQLITE_ORM_STATIC_CALLOP std::string operator()(const statement_type& c ,
21793+ SQLITE_ORM_STATIC_CALLOP std::string operator()(const statement_type& statement ,
2177421794 const Ctx& context) SQLITE_ORM_OR_CONST_CALLOP {
2177521795 std::stringstream ss;
21776- ss << serialize(c.t , context) << " " << static_cast<std::string>(c) ;
21796+ ss << serialize(statement.argument , context) << " IS NOT NULL" ;
2177721797 return ss.str();
2177821798 }
2177921799 };
@@ -26266,6 +26286,10 @@ namespace sqlite_orm::internal {
2626626286
2626726287// #include "ast/in.h"
2626826288
26289+ // #include "ast/is_null.h"
26290+
26291+ // #include "ast/is_not_null.h"
26292+
2626926293namespace sqlite_orm::internal {
2627026294 template<class T, class SFINAE = void>
2627126295 struct node_tuple {
0 commit comments