Class: PgObjects::ParsedObject::Base
- Inherits:
-
Object
- Object
- PgObjects::ParsedObject::Base
- Defined in:
- lib/pg_objects/parsed_object/base.rb
Overview
Base class for parsed objects
Direct Known Subclasses
Aggregate, BaseType, Conversion, Domain, EnumType, EventTrigger, Extension, Function, Index, MaterializedView, Operator, OperatorClass, Policy, RangeType, Rule, Sequence, Table, TextSearchParser, TextSearchTemplate, Trigger, Type, View
Instance Method Summary collapse
-
#initialize(stmt) ⇒ Base
constructor
A new instance of Base.
- #name ⇒ Object
-
#qualified_name ⇒ Object
Schema-qualified name (+schema.name+) when a schema is present, otherwise the same as
name.
Constructor Details
#initialize(stmt) ⇒ Base
Returns a new instance of Base.
7 8 9 |
# File 'lib/pg_objects/parsed_object/base.rb', line 7 def initialize(stmt) @stmt = stmt end |
Instance Method Details
#name ⇒ Object
11 12 13 |
# File 'lib/pg_objects/parsed_object/base.rb', line 11 def name raise NotImplementedError end |
#qualified_name ⇒ Object
Schema-qualified name (+schema.name+) when a schema is present, otherwise
the same as name. Used to disambiguate same-named objects across schemas.
17 18 19 20 |
# File 'lib/pg_objects/parsed_object/base.rb', line 17 def qualified_name schema_name = schema schema_name && !schema_name.empty? ? "#{schema_name}.#{name}" : name end |