Class Sequel::ToDot
In: lib/sequel/extensions/to_dot.rb
Parent: Object

Methods

new   output   output  

Classes and Modules

Module Sequel::ToDot::DatasetMethods

Constants

TO_DOT_OPTIONS = [:with, :distinct, :select, :from, :join, :where, :group, :having, :compounds, :order, :limit, :offset, :lock].freeze   The option keys that should be included in the dot output.

Public Class methods

Given a Dataset, parse the internal structure to generate a dataset visualization.

[Source]

    # File lib/sequel/extensions/to_dot.rb, line 32
32:     def initialize(ds)
33:       @i = 0
34:       @stack = [@i]
35:       @dot = ["digraph G {", "0 [label=\"self\"];"]
36:       v(ds, "")
37:       @dot << "}"
38:     end

Given a Dataset, return a string in dot format that will generate a visualization of the dataset.

[Source]

    # File lib/sequel/extensions/to_dot.rb, line 26
26:     def self.output(ds)
27:       new(ds).output
28:     end

Public Instance methods

Output the dataset visualization as a string in dot format.

[Source]

    # File lib/sequel/extensions/to_dot.rb, line 41
41:     def output
42:       @dot.join("\n")
43:     end

[Validate]