dm-metamapper 0.1.1 → 0.1.2

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.1.1" unless defined?(::DataMapper::MetaMapper::VERSION)
3
+ VERSION = "0.1.2" unless defined?(::DataMapper::MetaMapper::VERSION)
4
4
  end
5
5
 
6
6
  end
@@ -136,6 +136,7 @@ DBFace::erase(const vector<string>& tables,
136
136
  if (where.size())
137
137
  q << " WHERE " << where;
138
138
  log(q.str());
139
+ boost::mutex::scoped_lock lock(_mutex);
139
140
  return executeQuery(q);
140
141
 
141
142
  }
@@ -144,7 +145,6 @@ DBFace::erase(const vector<string>& tables,
144
145
  bool
145
146
  DBFace::executeQuery(Query& q)
146
147
  {
147
- boost::mutex::scoped_lock lock(_mutex);
148
148
  try{
149
149
  q.execute();
150
150
  }
@@ -196,6 +196,7 @@ DBFace::insert(const string& table,
196
196
  q << ")";
197
197
  }
198
198
  log(q.str());
199
+ boost::mutex::scoped_lock lock(_mutex);
199
200
  bool ok = executeQuery(q);
200
201
  return ok;
201
202
  }
@@ -228,6 +229,7 @@ DBFace::insert(const string& table,
228
229
  }
229
230
  q << ")";
230
231
  log(q.str());
232
+ boost::mutex::scoped_lock lock(_mutex);
231
233
  bool ok = executeQuery(q);
232
234
  ok = ok && getLastInsertId(q, rInsertId);
233
235
  return ok;
@@ -251,6 +253,7 @@ DBFace::update(const string& table,
251
253
  if (where.size())
252
254
  q << " WHERE " << where;
253
255
  log(q.str());
256
+ boost::mutex::scoped_lock lock(_mutex);
254
257
  return executeQuery(q);
255
258
  }
256
259
 
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: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
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: 2011-02-03 00:00:00 +02:00
19
+ date: 2011-02-08 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies: []
22
22