lib/pg_trunk/operations/materialized_views/column.rb
# Build SQL snippets for the column definition
# @return [Array<String>]
Build SQL snippets for the column definition
Build SQL snippets for the column definition
def to_sql(_version = "10")
      return ["RENAME COLUMN #{name.inspect} TO #{new_name.inspect}"] if new_name
      alter = "ALTER COLUMN #{name.inspect}"
      [
        *("#{alter} SET STATISTICS #{statistics}" if statistics),
        *("#{alter} SET (n_distinct = #{n_distinct})" if n_distinct),
        *("#{alter} RESET (n_distinct)" if n_distinct&.zero?),
        *("#{alter} SET STORAGE #{storage.to_s.upcase}" if storage.present?),
      ]
    end
def to_sql ( _version = "10" ) return [ "RENAME COLUMN #{name.inspect} TO #{new_name.inspect}" ] if new_name alter = "ALTER COLUMN #{name.inspect}" [ * ( "#{alter} SET STATISTICS #{statistics}" if statistics ) , * ( "#{alter} SET (n_distinct = #{n_distinct})" if n_distinct ) , * ( "#{alter} RESET (n_distinct)" if n_distinct &. zero? ) , * ( "#{alter} SET STORAGE #{storage.to_s.upcase}" if storage . present? ) , ] end
Build SQL snippets for the column definition
Build SQL snippets for the column definition
None
Array<String>
_version
<not_specific>