module Arel

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/arel.rbs

module Arel
  def self.arel_node?: (Arel::Attributes::Attribute value) -> true
  def self.fetch_attribute: (Arel::Nodes::Equality value, ) -> true
  def self.sql: (String raw_sql) -> Arel::Nodes::SqlLiteral
  def self.star: () -> Arel::Nodes::SqlLiteral
end

def self.arel_node?(value) # :nodoc:

Experimental RBS support (using type sampling data from the type_fusion project).

def self.arel_node?: (Arel::Attributes::Attribute value) -> true

This signature was generated using 2 samples from 1 application.

:nodoc:
def self.arel_node?(value) # :nodoc:
  value.is_a?(Arel::Nodes::Node) || value.is_a?(Arel::Attribute) || value.is_a?(Arel::Nodes::SqlLiteral)
end

def self.fetch_attribute(value, &block) # :nodoc:

Experimental RBS support (using type sampling data from the type_fusion project).

def self.fetch_attribute: (Arel::Nodes::Equality value, ) -> true

This signature was generated using 1 sample from 1 application.

:nodoc:
def self.fetch_attribute(value, &block) # :nodoc:
  unless String === value
    value.fetch_attribute(&block)
  end
end

def self.sql(raw_sql)

Experimental RBS support (using type sampling data from the type_fusion project).

def self.sql: (String raw_sql) -> Arel::Nodes::SqlLiteral

This signature was generated using 45 samples from 2 applications.

parameters or model attributes.
This method should not be used with unsafe values such as request
Great caution should be taken to avoid SQL injection vulnerabilities.

Post.order(Arel.sql("REPLACE(title, 'misc', 'zzzz') asc")).pluck(:id)

Wrap a known-safe SQL string for passing to query methods, e.g.
def self.sql(raw_sql)
  Arel::Nodes::SqlLiteral.new raw_sql
end

def self.star # :nodoc:

Experimental RBS support (using type sampling data from the type_fusion project).

def self.star: () -> Arel::Nodes::SqlLiteral

This signature was generated using 29 samples from 1 application.

:nodoc:
def self.star # :nodoc:
  sql "*"
end