Class: Momomoto::Datatype::Bytea

Inherits:
Base
  • Object
show all
Defined in:
lib/momomoto/datatype/bytea.rb

Overview

This class is used for Binary Data (Byte Array).

Instance Method Summary collapse

Methods inherited from Base

#compile_rule, #default, #default_operator, #equal, #filter_set, #initialize, #not_null?, operator_sign

Constructor Details

This class inherits a constructor from Momomoto::Datatype::Base

Instance Method Details

#escape(input) ⇒ Object

Escapes input using Database#quote_bytea or returns NULL if input is nil.



10
11
12
# File 'lib/momomoto/datatype/bytea.rb', line 10

def escape( input )
  input.nil? ? "NULL" : Database.quote_bytea( input )
end