Sha256: b47f6a4f823a20191efb43e24c5e357a409127fc6287aa34c333e6e056f06111

Contents?: true

Size: 916 Bytes

Versions: 28

Compression:

Stored size: 916 Bytes

Contents

# frozen_string_literal: true

class ReeDao::BuildPgConnection
  include Ree::FnDSL

  fn :build_pg_connection do
    link :build_connection
  end

  contract(
    {
      conn_str?: String,
      adapter: String,
      database?: String,
      encoding?: String,
      user?: String,
      password?: String,
      host?: String,
      port?: String,
      convert_infinite_timestamps?: Or[:string, :nil, :float],
      connect_timeout?: Integer,
      driver_options?: Hash,
      notice_receiver?: Proc,
      sslmode?: Or['disable', 'allow', 'prefer', 'require', 'verify-ca', 'verify-full'],
      sslrootcert?: String,
      search_path?: String,
      use_iso_date_format?: Bool,
    },
    Ksplat[
      RestKeys => Any # inherited from `build_connection` opts
    ] => Sequel::Database
  )
  def call(conn_opts, **opts)
    require 'sequel/adapters/postgres'
    build_connection(conn_opts, **opts)
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
ree_lib-1.0.28 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.27 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.26 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.24 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.23 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.22 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.21 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.20 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.19 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.18 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.17 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.16 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.15 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.14 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.13 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.12 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.11 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.10 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.9 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb
ree_lib-1.0.8 lib/ree_lib/packages/ree_dao/package/ree_dao/functions/build_pg_connection.rb