public
Rubygem
Fork of sam/do
Description: DataObjects
Homepage: http://rubyforge.org/projects/dorb
Clone URL: git://github.com/cypher/do.git
Search Repo:
Added README.markdown to repo root

* Whitespace cleanup
myabc (author)
Mon Jun 09 03:02:56 -0700 2008
commit  d46ac0ba667af3a6d3298446fa26e22f58e4dfc1
tree    f880b2dab0354514034b010699ec888a6e5f9cc4
parent  ad73df8c7e030a34c8b5d83c945486bad111c8db
...
12
13
14
15
16
 
...
12
13
14
 
15
16
0
@@ -12,4 +12,4 @@ nbproject
0
 *.*#
0
 *.rbc
0
 *.so
0
-*.dSYM
0
\ No newline at end of file
0
+*.dSYM
...
32
33
34
35
 
36
37
38
39
40
41
 
42
43
44
...
32
33
34
 
35
36
37
38
39
40
 
41
42
43
44
0
@@ -32,13 +32,13 @@ module DataObjects
0
 
0
     def self.new(uri)
0
       uri = uri.is_a?(String) ? Addressable::URI::parse(uri) : uri
0
-
0
+
0
       if uri.scheme == 'jdbc'
0
         driver_name = uri.path.split(':').first
0
       else
0
         driver_name = uri.scheme.capitalize
0
       end
0
-
0
+
0
       DataObjects.const_get(driver_name.capitalize)::Connection.acquire(uri)
0
     end
0
 
...
1
2
 
...
 
1
2
0
@@ -1 +1 @@
0
-ext-java/target
0
\ No newline at end of file
0
+ext-java/target
...
22
23
24
25
 
26
27
28
...
22
23
24
 
25
26
27
28
0
@@ -22,7 +22,7 @@ spec = Gem::Specification.new do |s|
0
   s.email = 'alex@alexcolesportfolio.com'
0
   s.homepage = 'http://rubyforge.org/projects/dorb'
0
   s.require_path = 'lib'
0
-
0
+
0
   s.files = FileList[ '{lib,spec}/**/*.{class,rb}', 'Rakefile', *s.extra_rdoc_files ]
0
   s.add_dependency('data_objects', "= #{s.version}")
0
   s.add_dependency('do_jdbc-support', "= #{s.version}")
...
12
13
14
15
 
16
17
18
...
12
13
14
 
15
16
17
18
0
@@ -12,7 +12,7 @@ if RUBY_PLATFORM =~ /java/
0
   require 'do_derby_ext'
0
   require 'java'
0
   require "derby-#{DataObjects::Derby::JDBC_DRIVER_VERSION}.jar"
0
-
0
+
0
   # Another way of loading the JDBC Class. This seems to be more relaible
0
   # than Class.forName() within the data_objects.Connection Java class,
0
   # which is currently not working as expected.
...
153
154
155
156
 
157
158
159
...
153
154
155
 
156
157
158
159
0
@@ -153,7 +153,7 @@ describe "DataObjects::Derby::Reader" do
0
     ]
0
 
0
     pending "ids not being returned using HSQLDB adapter"
0
-
0
+
0
     select("SELECT * FROM users WHERE id IN ?", nil, ids) do |reader|
0
       # select already calls next once for us
0
       reader.next!.should == true
...
108
109
110
111
 
112
113
114
...
108
109
110
 
111
112
113
114
0
@@ -108,7 +108,7 @@ module DerbySpecHelpers
0
         super_number BIGINT DEFAULT 9223372036854775807
0
       )
0
     EOF
0
-
0
+
0
     # REMOVED:
0
     # weight FLOAT DEFAULT 1.23,
0
     # cost1 REAL DEFAULT 10.23,
...
153
154
155
156
 
157
158
159
...
153
154
155
 
156
157
158
159
0
@@ -153,7 +153,7 @@ describe "DataObjects::Jdbc::Reader" do
0
     ]
0
 
0
     pending "ids not being returned using HSQLDB adapter"
0
-
0
+
0
     select("SELECT * FROM users WHERE id IN ?", nil, ids) do |reader|
0
       # select already calls next once for us
0
       reader.next!.should == true
...
167
168
169
170
 
171
172
173
174
175
 
176
177
 
178
179
 
180
181
182
 
183
184
185
...
167
168
169
 
170
171
172
173
174
 
175
176
 
177
178
 
179
180
181
 
182
183
184
185
0
@@ -167,19 +167,19 @@ describe "DataObjects::Postgres::Reader" do
0
     reader.next!
0
     dt = reader.values[0]
0
     reader.values[0].should be_a_kind_of(DateTime)
0
-
0
+
0
     command = @connection.create_command("SELECT created_at::date as date FROM users WHERE created_at is not null LIMIT 1")
0
     reader = command.execute_reader
0
     reader.next!
0
     reader.values[0].should be_a_kind_of(Date)
0
-
0
+
0
   end
0
-
0
+
0
   it "should work on a join" do
0
-
0
+
0
     user = @connection.create_command("SELECT * FROM users WHERE id = 1").execute_reader
0
     user.next!
0
-
0
+
0
     @connection.create_command("INSERT INTO companies (name) VALUES ('ELEC')").execute_non_query
0
     reader = @connection.create_command(<<-EOF).execute_reader
0
       SELECT u.* FROM users AS u
...
44
45
46
47
 
48
49
50
...
44
45
46
 
47
48
49
50
0
@@ -44,7 +44,7 @@ module PostgresSpecHelpers
0
       )
0
       WITH (OIDS=FALSE);
0
     EOF
0
-
0
+
0
     connection.create_command(<<-EOF).execute_non_query
0
       CREATE TABLE companies (
0
         id serial NOT NULL,
...
2
3
4
5
 
6
7
8
...
11
12
13
14
 
15
16
17
...
53
54
55
56
57
58
 
 
...
2
3
4
 
5
6
7
8
...
11
12
13
 
14
15
16
17
...
53
54
55
 
 
56
57
58
0
@@ -2,7 +2,7 @@ require File.expand_path(File.join(File.dirname(__FILE__), 'spec_helper'))
0
 
0
 describe "DataObjects::Postgres::Reader" do
0
   include PostgresSpecHelpers
0
-
0
+
0
   before :all do
0
     @connection = ensure_users_table_and_return_connection
0
     Time.now.to_s.match(/\w{3} \w{3} \d{2} \d{2}:\d{2}:\d{2} ([-+]\d{2})(\d{2})/)
0
@@ -11,7 +11,7 @@ describe "DataObjects::Postgres::Reader" do
0
     @connection.create_command("INSERT INTO users (name) VALUES ('Test')").execute_non_query
0
     @connection.create_command("INSERT INTO users (name) VALUES ('Test')").execute_non_query
0
   end
0
-
0
+
0
 
0
   it "should return DateTimes using the current locale's Time Zone for TIMESTAMP WITHOUT TIME ZONE fields" do
0
     date = DateTime.now
0
@@ -53,5 +53,5 @@ describe "DataObjects::Postgres::Reader" do
0
       exec("DELETE FROM users WHERE id = ?", id)
0
     end
0
   end
0
-
0
-end
0
\ No newline at end of file
0
+
0
+end

Comments

    No one has commented yet.