Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ def adapter_name #:nodoc:
def all_connections
[@master_connection] + @read_connections
end

# Returns the raw_connection for master
def raw_connection
@master_connection.raw_connection
end

# Get the pool weight of a connection
def pool_weight(connection)
Expand Down
5 changes: 5 additions & 0 deletions spec/seamless_database_pool_adapter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,11 @@ def columns (table_name, name = nil); end
expect(master_connection).to receive(:columns).with(:table).and_return(:retval)
pool_connection.columns(:table).should == :retval
end

it "#raw_connection returns the master raw_connection" do
expect(master_connection).to receive(:raw_connection).and_return(:base_connection)
pool_connection.raw_connection().should == :base_connection
end
end

context "fork to all connections" do
Expand Down