This class implements the interface for exprting SQLConstructor objects to strings.
Class constructor. Called with two optional arguments - dialect and tidy. Dialect determines the translator class (e.g., Exporter_mysql, Exporter_informix etc). Tidy determines whether the output should be formatted and human-readable.
# File lib/sqlexporter.rb, line 18 def initialize ( dialect = DEFAULT_DIALECT, tidy = false ) dialect ||= DEFAULT_DIALECT dialect_class = "Exporter_" + dialect.to_s begin @translator = SQLExporter.const_get( dialect_class ).new( tidy ) rescue raise NameError, ERR_UNKNOWN_DIALECT + ": " + dialect.to_s end @dialect, @tidy = dialect, tidy @separator = @translator.separator end
Generated with the Darkfish Rdoc Generator 2.