diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-02-21 11:07:25 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-02-21 11:10:21 +0200 |
commit | 6a0748d8fc5bdc7e584ca557f07ce53a796fd384 (patch) | |
tree | b71b7ef14511b49c53fdb6aa39f7ff8b3209f350 /odb/mssql/query.hxx | |
parent | c3c82a4c2ed3d82bb23eef9cd1aee181756d7015 (diff) |
Add support for pattern matching (SQL LIKE)
Diffstat (limited to 'odb/mssql/query.hxx')
-rw-r--r-- | odb/mssql/query.hxx | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/odb/mssql/query.hxx b/odb/mssql/query.hxx index a369746..0c87fa1 100644 --- a/odb/mssql/query.hxx +++ b/odb/mssql/query.hxx @@ -763,6 +763,47 @@ namespace odb query_base in_range (I begin, I end) const; + // like + // + public: + query_base + like (decayed_type 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> (decayed_type (pattern.val))); + } + + query_base + like (ref_bind<T> pattern) const; + + query_base + like (decayed_type pattern, decayed_type escape) const + { + return like (val_bind<T> (pattern), escape); + } + + query_base + like (val_bind<T> pattern, decayed_type escape) const; + + template <typename T2> + query_base + like (val_bind<T2> pattern, decayed_type escape) const + { + return like (val_bind<T> (decayed_type (pattern.val)), escape); + } + + query_base + like (ref_bind<T> pattern, decayed_type escape) const; + // = // public: |