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

new(ds)

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

[Source]

        # File lib/sequel/extensions/to_dot.rb, line 23
    23:     def initialize(ds)
    24:       @i = 0
    25:       @stack = [@i]
    26:       @dot = ["digraph G {", "0 [label=\"self\"];"]
    27:       v(ds, "")
    28:       @dot << "}"
    29:     end

output(ds)

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 17
    17:     def self.output(ds)
    18:       new(ds).output
    19:     end

### Public Instance methods

output()

Output the dataset visualization as a string in `dot` format.

[Source]

        # File lib/sequel/extensions/to_dot.rb, line 32
    32:     def output
    33:       @dot.join("\n")
    34:     end

[Validate]