Class: Sequel::Postgres::JSONValueOp
- Inherits:
- 
      JSONExistsOp
      
        - Object
- SQL::Expression
- JSONExistsOp
- Sequel::Postgres::JSONValueOp
 
- Defined in:
- lib/sequel/extensions/pg_json_ops.rb
Overview
Object representing json_value calls
Direct Known Subclasses
Instance Attribute Summary collapse
- 
  
    
      #on_empty  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    How to handle cases where the JSON path expression evaluation yields an empty set. 
- 
  
    
      #returning  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    The database type to cast returned values to. 
Attributes inherited from JSONExistsOp
#expr, #on_error, #passing, #path
Instance Method Summary collapse
- 
  
    
      #initialize(expr, path, opts = OPTS)  ⇒ JSONValueOp 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    See JSONBaseOp#value for documentation of the options. 
Methods inherited from JSONExistsOp
#sequel_ast_transform, #to_s_append
Methods inherited from SQL::Expression
#==, attr_reader, #clone, #eql?, #hash, inherited, #inspect
Constructor Details
#initialize(expr, path, opts = OPTS) ⇒ JSONValueOp
See JSONBaseOp#value for documentation of the options.
| 1016 1017 1018 1019 1020 | # File 'lib/sequel/extensions/pg_json_ops.rb', line 1016 def initialize(expr, path, opts=OPTS) @returning = opts[:returning] @on_empty = opts[:on_empty] super end | 
Instance Attribute Details
#on_empty ⇒ Object (readonly)
How to handle cases where the JSON path expression evaluation yields an empty set.
| 1013 1014 1015 | # File 'lib/sequel/extensions/pg_json_ops.rb', line 1013 def on_empty @on_empty end | 
#returning ⇒ Object (readonly)
The database type to cast returned values to
| 1009 1010 1011 | # File 'lib/sequel/extensions/pg_json_ops.rb', line 1009 def returning @returning end |