class Sequel::Mock::Connection

  1. lib/sequel/adapters/mock.rb
Parent: Mock

Connection class for Sequel's mock adapter.

Methods

Public Class

  1. new

Public Instance

  1. db
  2. execute
  3. opts
  4. server

Attributes

db [R]

Sequel::Mock::Database object that created this connection

opts [R]

The specific database options for this connection.

server [R]

Shard this connection operates on, when using Sequel’s sharding support (always :default for databases not using sharding).

Public Class methods

new (db, server, opts)

Store the db, server, and opts.

[show source]
# File lib/sequel/adapters/mock.rb, line 17
def initialize(db, server, opts)
  @db = db
  @server = server
  @opts = opts
end

Public Instance methods

execute (sql)

Delegate to the db’s #_execute method.

[show source]
# File lib/sequel/adapters/mock.rb, line 24
def execute(sql)
  @db.send(:_execute, self, sql, :log=>false) 
end