public
Fork of jeremyevans/sequel
Description: Sequel: The Database Toolkit for Ruby
Homepage: http://sequel.rubyforge.org
Clone URL: git://github.com/kevwil/sequel.git
got driver loading OK, still trouble with 'no results' on create table 
calls
kevwil (author)
Fri Jun 27 06:57:36 -0700 2008
commit  daf3b7c298ba7c0e09879f31d06712bad89d99b2
tree    c46bc4448172fd259e00799414a3b4a892198ae7
parent  4c4891f636904ac06351c6d92556f098a773d27f
...
7
8
9
10
 
11
12
13
...
20
21
22
 
 
23
24
25
26
27
28
29
 
 
30
31
32
...
7
8
9
 
10
11
12
13
...
20
21
22
23
24
25
26
27
28
29
 
 
30
31
32
33
34
0
@@ -7,7 +7,7 @@ module Sequel
0
     
0
     def self.load_driver(driver)
0
       JavaLang::Class.forName(driver)
0
- # "com.mysql.jdbc.Driver"
0
+ # "org.postgresql.Driver"
0
     end
0
     
0
     class Database < Sequel::Database
0
@@ -20,13 +20,15 @@ module Sequel
0
         unless conn_string =~ /^jdbc:/
0
           conn_string = "jdbc:#{conn_string}"
0
         end
0
+ conn_string = conn_string.gsub(":postgres:", ":postgresql:")
0
+ ::Sequel::JDBC.load_driver "org.postgresql.Driver"
0
         JavaSQL::DriverManager.getConnection(
0
           conn_string,
0
           @opts[:user],
0
           @opts[:password]
0
         )
0
- # "jdbc:mysql://127.0.0.1:3306/ruby?user=root"
0
- # "mysql://127.0.0.1:3306/ruby?user=root"
0
+ # "jdbc:postgresql://127.0.0.1:5432/ruby?user=root"
0
+ # "postgresql://127.0.0.1:5432/ruby?user=root"
0
       end
0
       
0
       def disconnect

Comments

    No one has commented yet.