cartodb-4.42/lib/carto/db/view.rb

26 lines
607 B
Ruby
Raw Normal View History

2024-04-06 13:25:13 +08:00
module Carto
module Db
class View
attr_reader :database_name, :database_schema, :name, :relkind
def initialize(database_name:, database_schema:, name:, relkind:)
@database_name = database_name
@database_schema = database_schema
@name = name
@relkind = relkind
end
def materialized_view?
@relkind == 'm'
end
def ==(other)
@database_name == other.database_name &&
@database_schema == other.database_schema &&
@name == other.name &&
@relkind == other.relkind
end
end
end
end