Class: Sequel::Postgres::PropertyGraph::Generator
- Defined in:
- lib/sequel/adapters/shared/postgres.rb
Overview
Base class for all Generator DSL classes. This uses a design where The DSL class is only used for the evaluation of the block, and new returns a frozen struct.
Direct Known Subclasses
Defined Under Namespace
Classes: Alter, AlterElement, Create, Edge, Element, Target
Constant Summary collapse
- Vertex =
Vertex is used for the block passed to Create#vertex, used to configure vertices in the property graph. It doesn't have any additional behavior compared to the Element class, so this is an alias instead of a subclass.
Element
Class Method Summary collapse
-
.new(*args, &block) ⇒ Object
Instead of returning the Generator instance, return a frozen struct with data from the generator.
Class Method Details
.new(*args, &block) ⇒ Object
Instead of returning the Generator instance, return a frozen struct with data from the generator. This prevents accidentally calling the generator methods, and makes it possible for the generator class and result class to use the same method name in two different ways, with the generator setting data and the frozen struct method returning it. The frozen struct classes use the constant Data under each generator subclass.
271 272 273 |
# File 'lib/sequel/adapters/shared/postgres.rb', line 271 def self.new(*args, &block) super(*args, &block).data end |