dm-metamapper 0.1.9 → 0.2.0

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.9" unless defined?(::DataMapper::MetaMapper::VERSION)
3
+ VERSION = "0.2.0" unless defined?(::DataMapper::MetaMapper::VERSION)
4
4
  end
5
5
 
6
6
  end
@@ -29,6 +29,9 @@ DBFace::DBFace(const string& database, const string& host,
29
29
  void
30
30
  DBFace::connect()
31
31
  {
32
+ if (_connection.connected())
33
+ _connection.disconnect();
34
+
32
35
  if (!_connection.connect(_database.c_str(), _host.c_str(),
33
36
  _user.c_str(), _password.c_str()))
34
37
  {
@@ -20,6 +20,9 @@ public:
20
20
  DBFace(const std::string& database, const std::string& host,
21
21
  const std::string& user, const std::string& password,
22
22
  std::ostream* os);
23
+
24
+ ~DBFace() { _connection.disconnect(); }
25
+
23
26
  void connect();
24
27
 
25
28
  bool insert(const std::string& table,
@@ -23,6 +23,7 @@ typedef Field<double> F_Float;
23
23
  typedef Field<std::string> F_String;
24
24
  typedef Field<bool> F_TrueClass;
25
25
  typedef Field<std::string> F_DateTime;
26
+ typedef Field<std::string> F_Date;
26
27
 
27
28
  } //namespace DMMM
28
29
 
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: 9
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 9
10
- version: 0.1.9
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
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-09-19 00:00:00 Z
19
+ date: 2011-12-04 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.