diff options
Diffstat (limited to 'odb/query-dynamic.hxx')
-rw-r--r-- | odb/query-dynamic.hxx | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/odb/query-dynamic.hxx b/odb/query-dynamic.hxx index a2779b1..132e0c0 100644 --- a/odb/query-dynamic.hxx +++ b/odb/query-dynamic.hxx @@ -135,6 +135,8 @@ namespace odb op_not_null, // is_not_null () op_in, // in(), data is the number of arguments + op_like, // like(pattern) + op_like_escape, // like(pattern, escape) op_eq, // == op_ne, // != @@ -415,6 +417,47 @@ namespace odb query_base in_range (I begin, I end) const; + // like + // + public: + query_base + like (const T& pattern) const + { + return like (val_bind<T> (pattern)); + } + + query_base + like (val_bind<T> pattern) const; + + template <typename T2> + query_base + like (val_bind<T2> pattern) const + { + return like (val_bind<T> (T (pattern.val))); + } + + query_base + like (ref_bind<T> pattern) const; + + query_base + like (const T& pattern, const T& escape) const + { + return like (val_bind<T> (pattern), escape); + } + + query_base + like (val_bind<T> pattern, const T& escape) const; + + template <typename T2> + query_base + like (val_bind<T2> pattern, const T& escape) const + { + return like (val_bind<T> (T (pattern.val)), escape); + } + + query_base + like (ref_bind<T> pattern, const T& escape) const; + // == // public: |