Sha256: a8be819c861a4f1b0d6d04c0916c7f32ab909d5561b87772a950cdba1d3d308e
Contents?: true
Size: 516 Bytes
Versions: 28
Compression:
Stored size: 516 Bytes
Contents
# frozen_string_literal: true module TableSync::NamingResolver class Sequel def initialize(table_name:, db:) @table_name = table_name @db = db end def table table_name.is_a?(::Sequel::SQL::QualifiedIdentifier) ? table_name.column : table_name end def schema return table_name.table if table_name.is_a?(::Sequel::SQL::QualifiedIdentifier) db.get(Sequel.function("current_schema")) rescue "public" end private attr_reader :table_name, :db end end
Version data entries
28 entries across 28 versions & 1 rubygems