Class | Sequel::OpenBase::Database
In: | lib/sequel/adapters/openbase.rb
Parent: | Sequel::Database

### Methods

connect dataset do execute

### Public Instance methods

connect(server)

[Source]

        # File lib/sequel/adapters/openbase.rb, line 8
     8:       def connect(server)
     9:         opts = server_opts(server)
    10:         OpenBase.new(
    11:           opts[:database],
    12:           opts[:host] || 'localhost',
    13:           opts[:user],
    14:           opts[:password]
    15:         )
    16:       end

dataset(opts = nil)

[Source]

        # File lib/sequel/adapters/openbase.rb, line 18
    18:       def dataset(opts = nil)
    19:         OpenBase::Dataset.new(self, opts)
    20:       end

do(sql, opts={})

Alias for execute

execute(sql, opts={}) {|r| ...}

[Source]

        # File lib/sequel/adapters/openbase.rb, line 22
    22:       def execute(sql, opts={})
    23:         log_info(sql)
    24:         synchronize(opts[:server]) do |conn|
    25:           r = conn.execute(sql)
    26:           yield(r) if block_given?
    27:           r
    28:         end
    29:       end

[Validate]