Sha256: b3e2ea2ee3ed8c61b1d5012e2443e8cb71d031d57a8bd3b6374860a3fc72fef6

Contents?: true

Size: 511 Bytes

Versions: 2

Compression:

Stored size: 511 Bytes

Contents

safe_require 'sequel', 'gem install sequel'
require 'sequel/adapters/postgres'

##
# Midori Extension of sequel postgres through meta programming
class Sequel::Postgres::Adapter
  # Call a sql request asynchronously
  # @param [ String ] sql sql request
  # @param [ Array ] args args to send
  # @return [ Array ] sql query result
  def execute_query(sql, args)
    @db.log_connection_yield(sql, self, args) do
      args ? await(defer{async_exec(sql, args)}) : await(defer{async_exec(sql)})
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
em-midori-0.1.7.1 lib/midori/extension/sequel.rb
em-midori-0.1.7 lib/midori/extension/sequel.rb