Class: Arel::Nodes::SqlLiteral
- Includes:
 - AliasPredication, Expressions, OrderPredications, Predications
 
- Defined in:
 - activerecord/lib/arel/nodes/sql_literal.rb
 
Constant Summary
Constants inherited from String
String::BLANK_RE, String::ENCODED_BLANKS
Instance Attribute Summary collapse
- 
  
    
      #retryable  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    
Returns the value of attribute retryable.
 
Instance Method Summary collapse
- #+(other) ⇒ Object
 - #encode_with(coder) ⇒ Object
 - #fetch_attribute ⇒ Object
 - 
  
    
      #initialize(string, retryable: false)  ⇒ SqlLiteral 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    
A new instance of SqlLiteral.
 
Methods included from OrderPredications
Methods included from AliasPredication
Methods included from Predications
#between, #concat, #contains, #does_not_match, #does_not_match_all, #does_not_match_any, #does_not_match_regexp, #eq, #eq_all, #eq_any, #gt, #gt_all, #gt_any, #gteq, #gteq_all, #gteq_any, #in, #in_all, #in_any, #is_distinct_from, #is_not_distinct_from, #lt, #lt_all, #lt_any, #lteq, #lteq_all, #lteq_any, #matches, #matches_all, #matches_any, #matches_regexp, #not_between, #not_eq, #not_eq_all, #not_eq_any, #not_in, #not_in_all, #not_in_any, #overlaps, #quoted_array, #when
Methods included from Expressions
#average, #count, #extract, #maximum, #minimum, #sum
Methods inherited from String
#acts_like_string?, #as_json, #at, #blank?, #camelize, #classify, #constantize, #dasherize, #deconstantize, #demodulize, #downcase_first, #exclude?, #first, #foreign_key, #from, #html_safe, #humanize, #in_time_zone, #indent, #indent!, #inquiry, #is_utf8?, #last, #mb_chars, #parameterize, #pluralize, #present?, #remove, #remove!, #safe_constantize, #singularize, #squish, #squish!, #strip_heredoc, #tableize, #titleize, #to, #to_date, #to_datetime, #to_time, #truncate, #truncate_bytes, #truncate_words, #underscore, #upcase_first
Constructor Details
#initialize(string, retryable: false) ⇒ SqlLiteral
Returns a new instance of SqlLiteral.
      13 14 15 16  | 
    
      # File 'activerecord/lib/arel/nodes/sql_literal.rb', line 13 def initialize(string, retryable: false) @retryable = retryable super(string) end  | 
  
Instance Attribute Details
#retryable ⇒ Object (readonly)
Returns the value of attribute retryable.
      11 12 13  | 
    
      # File 'activerecord/lib/arel/nodes/sql_literal.rb', line 11 def retryable @retryable end  | 
  
Instance Method Details
#+(other) ⇒ Object
      25 26 27 28 29  | 
    
      # File 'activerecord/lib/arel/nodes/sql_literal.rb', line 25 def +(other) raise ArgumentError, "Expected Arel node" unless Arel.arel_node?(other) Fragments.new([self, other]) end  | 
  
#encode_with(coder) ⇒ Object
      18 19 20  | 
    
      # File 'activerecord/lib/arel/nodes/sql_literal.rb', line 18 def encode_with(coder) coder.scalar = self.to_s end  | 
  
#fetch_attribute ⇒ Object
      22 23  | 
    
      # File 'activerecord/lib/arel/nodes/sql_literal.rb', line 22 def fetch_attribute(&) end  |