Class: ActiveEnquo::Type::Bigint
- Inherits:
-
ActiveEnquo::Type
- Object
- ActiveRecord::Type::Value
- ActiveEnquo::Type
- ActiveEnquo::Type::Bigint
- Defined in:
- lib/active_enquo.rb
Instance Method Summary collapse
- #decrypt(value, context, field) ⇒ Object
- #encrypt(value, context, field, enable_reduced_security_operations: false, no_query: false) ⇒ Object
- #type ⇒ Object
Instance Method Details
#decrypt(value, context, field) ⇒ Object
295 296 297 |
# File 'lib/active_enquo.rb', line 295 def decrypt(value, context, field) field.decrypt_i64(value, context) end |
#encrypt(value, context, field, enable_reduced_security_operations: false, no_query: false) ⇒ Object
287 288 289 290 291 292 293 |
# File 'lib/active_enquo.rb', line 287 def encrypt(value, context, field, enable_reduced_security_operations: false, no_query: false) if value.nil? || value.is_a?(::ActiveRecord::StatementCache::Substitute) value else field.encrypt_i64(value, context, unsafe: enable_reduced_security_operations, no_query: no_query) end end |
#type ⇒ Object
283 284 285 |
# File 'lib/active_enquo.rb', line 283 def type :enquo_bigint end |