Class: SqlView::SchemaDumper::DBView Private

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/sql_view/schema_dumper.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#to_schemaObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



9
10
11
12
13
14
15
16
# File 'lib/sql_view/schema_dumper.rb', line 9

def to_schema
  <<-DEFINITION
  create_sql_view "#{viewname}", sql: <<-\SQL
    CREATE#{materialized_or_not}VIEW "#{viewname}" AS
    #{escaped_definition.indent(2)}
  SQL\n
  DEFINITION
end