Module: Torque::PostgreSQL::Base::ClassMethods

Included in:
ActiveRecord::Base
Defined in:
sig/torque/postgresql/base.rbs

Instance Method Summary collapse

Instance Method Details

#arel_property_of ⇒ Torque::PostgreSQL::Arel::Nodes::Property

Parameters:

  • column (column_ref)
  • path (column_ref, Integer)

Returns:



14
# File 'sig/torque/postgresql/base.rbs', line 14

def arel_property_of: (column_ref column, *column_ref | Integer path) -> Torque::PostgreSQL::Arel::Nodes::Property

#auxiliary_statement {|arg0| ... } ⇒ Object Also known as: cte

Parameters:

  • table (Symbol)

Yields:

Yield Parameters:

Yield Returns:

  • (void)

Returns:

  • (Object)


20
# File 'sig/torque/postgresql/base.rbs', line 20

def auxiliary_statement: (Symbol table) ?{ (AuxiliaryStatement::Settings) -> void } -> untyped

#belongs_to_many {|arg0| ... } ⇒ Object

Parameters:

  • name (Symbol)
  • scope (Proc, nil)
  • class_name: (String)
  • foreign_key: (column_ref)
  • primary_key: (column_ref)
  • dependent: (Symbol)
  • touch: (bool, Symbol)
  • optional: (Boolean)
  • required: (Boolean)
  • default: (Proc)
  • inverse_of: (Symbol)
  • autosave: (Boolean)
  • validate: (Boolean)
  • options (Object)

Yields:

Yield Parameters:

  • arg0

Yield Returns:

  • (Object)

Returns:

  • (Object)


18
# File 'sig/torque/postgresql/base.rbs', line 18

def belongs_to_many: (Symbol name, ?Proc? scope, ?class_name: String, ?foreign_key: column_ref, ?primary_key: column_ref, ?dependent: Symbol, ?touch: bool | Symbol, ?optional: bool, ?required: bool, ?default: Proc, ?inverse_of: Symbol, ?autosave: bool, ?validate: bool, **untyped options) ?{ (?) -> untyped } -> untyped

#buckets ⇒ relation

Parameters:

  • attribute (Relation::column_spec, arel_node)
  • values (Relation::Buckets::keys)
  • count: (Integer, nil)
  • cast: (column_ref, nil)
  • as: (column_ref, nil)

Returns:

  • (relation)


12
# File 'sig/torque/postgresql/base.rbs', line 12

def buckets: (Relation::column_spec | arel_node attribute, Relation::Buckets::keys values, ?count: Integer?, ?cast: column_ref?, ?as: column_ref?) -> relation

#distinct_on ⇒ relation

Parameters:

  • value (Relation::column_spec)

Returns:

  • (relation)


7
# File 'sig/torque/postgresql/base.rbs', line 7

def distinct_on: (*Relation::column_spec value) -> relation

#dynamic_attribute {|arg0| ... } ⇒ Symbol

Parameters:

  • name (Symbol)

Yields:

Yield Parameters:

  • arg0

Yield Returns:

  • (Object)

Returns:

  • (Symbol)


19
# File 'sig/torque/postgresql/base.rbs', line 19

def dynamic_attribute: (Symbol name) { (?) -> untyped } -> Symbol

#expand_records ⇒ relation

Parameters:

  • types (model)
  • eager_load: (Boolean)
  • filter: (Boolean)

Returns:

  • (relation)


10
# File 'sig/torque/postgresql/base.rbs', line 10

def expand_records: (*model types, ?eager_load: bool, ?filter: bool) -> relation

#inherited ⇒ Object

Parameters:

  • subclass (model)

Returns:

  • (Object)


17
# File 'sig/torque/postgresql/base.rbs', line 17

def inherited: (model subclass) -> untyped

#itself_only ⇒ relation

Returns:

  • (relation)


9
# File 'sig/torque/postgresql/base.rbs', line 9

def itself_only: () -> relation

#join_series {|series, table| ... } ⇒ relation

Parameters:

  • range (Object)
  • with: (Relation::JoinSeries::with, nil)
  • as: (column_ref)
  • step: (Relation::JoinSeries::step, nil)
  • time_zone: (Object)
  • cast: (column_ref, nil)
  • mode: (Symbol)

Yields:

Yield Parameters:

Yield Returns:

  • (arel_node)

Returns:

  • (relation)


11
# File 'sig/torque/postgresql/base.rbs', line 11

def join_series: (untyped range, ?with: Relation::JoinSeries::with?, ?as: column_ref, ?step: Relation::JoinSeries::step?, ?time_zone: untyped, ?cast: column_ref?, ?mode: Symbol) ?{ (Torque::PostgreSQL::Arel::Nodes::Ref series, arel_table table) -> arel_node } -> relation

#load_schema! ⇒ Object

Returns:

  • (Object)


15
# File 'sig/torque/postgresql/base.rbs', line 15

def load_schema!: () -> untyped

#recursive_auxiliary_statement {|arg0| ... } ⇒ Object Also known as: recursive_cte

Parameters:

  • table (Symbol)

Yields:

Yield Parameters:

Yield Returns:

  • (void)

Returns:

  • (Object)


22
# File 'sig/torque/postgresql/base.rbs', line 22

def recursive_auxiliary_statement: (Symbol table) ?{ (AuxiliaryStatement::Settings) -> void } -> untyped

#reset_table_name ⇒ String, TableName

Returns:



16
# File 'sig/torque/postgresql/base.rbs', line 16

def reset_table_name: () -> (String | TableName)

#segments ⇒ relation

Parameters:

  • map (Relation::Segments::condition)

Returns:

  • (relation)


13
# File 'sig/torque/postgresql/base.rbs', line 13

def segments: (**Relation::Segments::condition map) -> relation

#with ⇒ relation

Parameters:

  • args (Relation::AuxiliaryStatement::statement)
  • recursive: (Boolean)
  • settings (Object)

Returns:

  • (relation)


8
# File 'sig/torque/postgresql/base.rbs', line 8

def with: (*Relation::AuxiliaryStatement::statement args, ?recursive: bool, **untyped settings) -> relation