debian-mirror-gitlab/lib/gitlab/database/schema_validation/schema_objects/base.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
554 B
Ruby
Raw Normal View History

2023-05-27 22:25:52 +05:30
# frozen_string_literal: true
module Gitlab
module Database
module SchemaValidation
module SchemaObjects
class Base
def initialize(parsed_stmt)
@parsed_stmt = parsed_stmt
end
def name
raise NoMethodError, "subclasses of #{self.class.name} must implement #{__method__}"
end
def statement
@statement ||= PgQuery.deparse_stmt(parsed_stmt)
end
private
attr_reader :parsed_stmt
end
end
end
end
end