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

Methods

new   output   output  

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 19
19:     def initialize(ds)
20:       @i = 0
21:       @stack = [@i]
22:       @dot = ["digraph G {", "0 [label=\"self\"];"]
23:       v(ds, "")
24:       @dot << "}"
25:     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 13
13:     def self.output(ds)
14:       new(ds).output
15:     end

Public Instance methods

Output the dataset visualization as a string in dot format.

[Source]

    # File lib/sequel/extensions/to_dot.rb, line 28
28:     def output
29:       @dot.join("\n")
30:     end

[Validate]