Classes and Modules
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.
[show source]
# File lib/sequel/extensions/to_dot.rb, line 32 def initialize(ds) @i = 0 @stack = [@i] @dot = ["digraph G {", "0 [label=\"self\"];"] v(ds, "") @dot << "}" end
output
(ds)
Given a Dataset
, return a string in dot
format
that will generate a visualization of the dataset.
[show source]
# File lib/sequel/extensions/to_dot.rb, line 26 def self.output(ds) new(ds).output end
Public Instance methods
output
()
Output the dataset visualization as a string in dot
format.
[show source]
# File lib/sequel/extensions/to_dot.rb, line 41 def output @dot.join("\n") end