class ActiveFacts::Generators::Traits::SQL::Postgres::PostgresDataTypeContext

Public Instance Methods

boolean_expr(safe_column_name) click to toggle source

See www.postgresql.org/docs/9.0/static/datatype-boolean.html

# File lib/activefacts/generator/traits/sql/postgres.rb, line 305
def boolean_expr safe_column_name
  safe_column_name  # psql outputs as 't' or 'f', but the bare column is a boolean expression
end
boolean_type() click to toggle source
# File lib/activefacts/generator/traits/sql/postgres.rb, line 300
def boolean_type
  'BOOLEAN'
end
date_time_type() click to toggle source
# File lib/activefacts/generator/traits/sql/postgres.rb, line 321
def date_time_type
  'TIMESTAMP'
end
default_char_type() click to toggle source

There is no performance benefit in using fixed-length CHAR fields, and an added burden of trimming the implicitly added white-space

# File lib/activefacts/generator/traits/sql/postgres.rb, line 311
def default_char_type
  (@unicode ? 'N' : '') +
  'VARCHAR'
end
default_varchar_type() click to toggle source
# File lib/activefacts/generator/traits/sql/postgres.rb, line 316
def default_varchar_type
  (@unicode ? 'N' : '') +
  'VARCHAR'
end
integer_ranges() click to toggle source
# File lib/activefacts/generator/traits/sql/postgres.rb, line 296
def integer_ranges
  super
end