diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2011-07-21 15:24:46 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2011-07-22 17:57:00 +0200 |
commit | 794b3767df6f39e9b195e3a3735edf665f660c21 (patch) | |
tree | 7d7147d58fd282ab3f150e2f1d272d052c985e60 /odb/relational/context.hxx | |
parent | 5cf8ecfc25d56e733e2c803942f1bee0378e6639 (diff) |
Add support for SQL string quoting
Diffstat (limited to 'odb/relational/context.hxx')
-rw-r--r-- | odb/relational/context.hxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/odb/relational/context.hxx b/odb/relational/context.hxx index 08f8b81..e654aee 100644 --- a/odb/relational/context.hxx +++ b/odb/relational/context.hxx @@ -28,6 +28,11 @@ namespace relational grow (semantics::data_member&, semantics::type&, string const& key_prefix); public: + // Quote SQL string. + // + string + quote_string (string const&) const; + // Quote SQL identifier. // string @@ -75,6 +80,15 @@ namespace relational semantics::type&, string const&); + // The default implementation uses the ISO quoting ('') and + // escapes singe quotes inside the string by double-quoting + // (' -> ''). Some (most?) database systems support escape + // sequences. We may want to provide utilize that to support + // things like \n, \t, etc. + // + virtual string + quote_string_impl (string const&) const; + // The default implementation uses the ISO quoting (""). // virtual string |