dohruby 0.1.8 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG CHANGED
@@ -20,13 +20,16 @@
20
20
  * implement db hash util: insert_hash, update_hash, select_as_hash
21
21
  * add logger util: default_logfile_name
22
22
  * add set_source_ip function, change default source_ip to 'unknown'
23
- *0.1.8*
23
+ *0.1.8* (April 17th, 2008)
24
24
  * display full log output when reporting an unhandled error after unit tests run
25
25
  * renamed BigDecimal.original_to_s to BigDecimal._doh_original_to_s so it doesn't conflict with Rails
26
26
  * changed unit test log file name to always just be "doh_unit_tests.log"
27
27
  * remove need for database being created to already exist (yes it's kind of silly)
28
28
  * add convenience include for mysql library
29
-
30
-
29
+ *0.1.9* (April 17th, 2008)
30
+ * doh/mysql/database_creator - reset the active database to the destination db after creation is complete
31
+ * add to_sql, unquoted to mysql convenience include
32
+ * change Handle::query failure log level from fatal to error
33
+ * remove useless exception handling in mysql/database_creator
31
34
 
32
35
 
@@ -33,13 +33,12 @@ private
33
33
  Doh::log.info("DohDb::DatabaseCreator - creating source database " + source_db + " inside " + dest_db)
34
34
  dbh.query("DROP DATABASE IF EXISTS " + dest_db) if drop_first
35
35
 
36
- begin
37
- dbh.query("CREATE DATABASE " + dest_db)
38
- rescue Exception => excpt
39
- raise RuntimeError.new("database #{dest_db} already exists")
40
- end
36
+ dbh.query("CREATE DATABASE " + dest_db)
41
37
  load_sql_files('tables', source_db, dest_db)
42
38
  load_sql_files('insert_sql', source_db, dest_db)
39
+
40
+ @connector.database = dest_db
41
+ dbh.query("USE " + dest_db)
43
42
  end
44
43
 
45
44
  def load_sql_files(subdir, source_db, dest_db)
@@ -27,7 +27,7 @@ class Handle
27
27
  Doh::log.info(sqlstr)
28
28
  @mysqlh.query(sqlstr)
29
29
  rescue Exception => excpt
30
- Doh::log.fatal("caught exception during query: #{sqlstr}", excpt)
30
+ Doh::log.error("caught exception during query: #{sqlstr}", excpt)
31
31
  raise
32
32
  end
33
33
 
data/lib/doh/mysql.rb CHANGED
@@ -1,3 +1,5 @@
1
1
  require 'doh/mysql/cache_connector'
2
2
  require 'doh/mysql/connector_instance'
3
3
  require 'doh/mysql/handle'
4
+ require 'doh/mysql/to_sql'
5
+ require 'doh/mysql/unquoted'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dohruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Makani & Kem Mason