Class: Lore::Type

Inherits:
Object show all
Defined in:
lib/lore/adapters/postgres/types.rb,
lib/lore/adapters/postgres-pr/types.rb

Class Method Summary collapse

Class Method Details

.booleanObject



41
# File 'lib/lore/adapters/postgres/types.rb', line 41

def self.boolean; 'boolean'; end

.byteaObject



42
# File 'lib/lore/adapters/postgres/types.rb', line 42

def self.bytea; 'bytea'; end

.charObject



43
# File 'lib/lore/adapters/postgres/types.rb', line 43

def self.char; 'char'; end

.dateObject



47
# File 'lib/lore/adapters/postgres/types.rb', line 47

def self.date; 'date'; end

.decimalObject



49
# File 'lib/lore/adapters/postgres/types.rb', line 49

def self.decimal; 'decimal'; end

.integerObject



40
# File 'lib/lore/adapters/postgres/types.rb', line 40

def self.integer; 'integer'; end

.textObject



48
# File 'lib/lore/adapters/postgres/types.rb', line 48

def self.text; 'text'; end

.timeObject



45
# File 'lib/lore/adapters/postgres/types.rb', line 45

def self.time; 'time'; end

.timestampObject



46
# File 'lib/lore/adapters/postgres/types.rb', line 46

def self.timestamp; 'timestamp'; end

.type_name(int) ⇒ Object



51
52
53
# File 'lib/lore/adapters/postgres/types.rb', line 51

def self.type_name(int)
  TYPE_NAMES[int]
end

.varchar(length = 255) ⇒ Object



44
# File 'lib/lore/adapters/postgres/types.rb', line 44

def self.varchar(length=255); 'character varying(' << length.to_s + ')'; end