Sha256: ed819ef8bd52ccb9befe30721a50b7dbe43b6aee6b2b3e607fb5c072d01c78fa

Contents?: true

Size: 439 Bytes

Versions: 30

Compression:

Stored size: 439 Bytes

Contents

# frozen_string_literal: true

module Sequel
  module SetLocal
    private

    def begin_new_transaction(conn, opts)
      super
      check_set_local(conn, opts[:set_local])
    end

    def check_set_local(conn, locals)
      return if locals.nil?

      locals.each do |key, value|
        log_connection_execute(conn, "SET LOCAL #{key} = \"#{value}\"")
      end
    end
  end

  Database.register_extension(:set_local, SetLocal)
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
umbrellio-sequel-plugins-0.17.0 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.16.1 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.16.0.239 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.16.0.238 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.16.0.235 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.16.0.234 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.16.0.233 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.16.0 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.16.0.211 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.15.0.198 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.14.0.192 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.14.0.189 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.14.0.188 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.14.0.187 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.14.0 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.13.0.185 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.13.0.172 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.13.0 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.12.0.169 lib/sequel/extensions/set_local.rb
umbrellio-sequel-plugins-0.12.0 lib/sequel/extensions/set_local.rb