dm-metamapper 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  module DataMapper
2
2
  module MetaMapper
3
- VERSION = "0.2.6" unless defined?(::DataMapper::MetaMapper::VERSION)
3
+ VERSION = "0.2.7" unless defined?(::DataMapper::MetaMapper::VERSION)
4
4
  end
5
5
 
6
6
  end
@@ -291,4 +291,16 @@ DBFace::now()
291
291
  return UTILS::toString(mysqlRes[0]["now()"]);
292
292
  }
293
293
 
294
+ string
295
+ sanitize(const string& s)
296
+ {
297
+ mysqlpp::Query q(0);
298
+ string escaped;
299
+ q.escape_string(&escaped, s.c_str());
300
+ q << escaped;
301
+
302
+ return q.str();
303
+ }
304
+
305
+
294
306
  } //namespace DMMM
@@ -88,6 +88,8 @@ toSQLString(const T& t)
88
88
  return q.str();
89
89
  }
90
90
 
91
+ std::string sanitize(const std::string& s);
92
+
91
93
 
92
94
  } //namespace DMMM
93
95
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-metamapper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 6
10
- version: 0.2.6
9
+ - 7
10
+ version: 0.2.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jonah Honeyman
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2012-07-01 00:00:00 Z
19
+ date: 2012-07-02 00:00:00 Z
20
20
  dependencies: []
21
21
 
22
22
  description: C++ API for databases created with DM. Hard typing, compile time checked queries.