module Sequel::Postgres::InetDatasetMethods
Private Instance Methods
Source
# File lib/sequel/extensions/pg_inet.rb 115 def auto_param_type_fallback(v) 116 if defined?(super) && (type = super) 117 type 118 elsif IPAddr === v 119 "::inet" 120 end 121 end
Allow auto parameterization of IPAddr instances.
Calls superclass method
Source
# File lib/sequel/extensions/pg_inet.rb 125 def literal_other_append(sql, value) 126 if value.is_a?(IPAddr) 127 literal_string_append(sql, "#{value.to_s}/#{value.instance_variable_get(:@mask_addr).to_s(2).count('1')}") 128 else 129 super 130 end 131 end
Convert IPAddr value to a string and append a literal version of the string to the sql.
Calls superclass method