Skip to content

Commit

Permalink
Merge branch 'main' into activerecord/with
Browse files Browse the repository at this point in the history
  • Loading branch information
tk0miya authored Sep 10, 2024
2 parents 2f55398 + 1420c80 commit 963dd0c
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 6 deletions.
6 changes: 6 additions & 0 deletions gems/activerecord/6.0/activerecord-6.0.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,9 @@ module ActiveRecord
def initialize: (untyped model, untyped inserts, on_duplicate: untyped, ?unique_by: untyped?, ?returning: untyped?) -> untyped
end
end

module Arel
class Table
def initialize: (untyped name, ?type_caster: untyped? type_caster, ?as: untyped? as) -> untyped
end
end
2 changes: 0 additions & 2 deletions gems/activerecord/6.0/activerecord-generated.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -23508,8 +23508,6 @@ module Arel
# TableAlias and Table both have a #table_name which is the name of the underlying table
alias table_name name

def initialize: (untyped name, ?type_caster: untyped? type_caster, ?as: untyped? as) -> untyped

def alias: (?::String name) -> Nodes::TableAlias

def from: () -> SelectManager
Expand Down
3 changes: 3 additions & 0 deletions gems/activerecord/6.0/activerecord.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,7 @@ module ActiveRecord
def find_each: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (Model) -> void } -> nil
def find_in_batches: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (Array[Model]) -> void } -> nil
def in_batches: (?of: Integer, ?start: Integer, ?finish: Integer, ?load: bool, ?error_on_ignore: bool, ?order: untyped) { (self) -> void } -> nil
def sum: (?untyped? column_name) -> Integer
def destroy_all: () -> untyped
def delete_all: () -> untyped
def update_all: (*untyped) -> untyped
Expand Down Expand Up @@ -457,6 +458,7 @@ module ActiveRecord
def find_each: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (Model) -> void } -> nil
def find_in_batches: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (Array[Model]) -> void } -> nil
def in_batches: (?of: Integer, ?start: Integer, ?finish: Integer, ?load: bool, ?error_on_ignore: bool, ?order: untyped) { (Relation) -> void } -> nil
def sum: (?untyped? column_name) -> Integer
def destroy_all: () -> untyped
def delete_all: () -> untyped
def update_all: (*untyped) -> untyped
Expand All @@ -466,6 +468,7 @@ module ActiveRecord
def select: (*Symbol | String) -> Relation
| () { (Model) -> boolish } -> Array[Model]
def reselect: (*Symbol | String) -> Relation
def scope: (Symbol, ^(*untyped, **untyped) [self: Relation] -> void) ?{ (Module extention) [self: Relation] -> void } -> void
end
end
end
Expand Down
6 changes: 6 additions & 0 deletions gems/activerecord/6.1/activerecord-6.1.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,9 @@ module ActiveRecord
def initialize: (untyped model, untyped inserts, on_duplicate: untyped, ?unique_by: untyped?, ?returning: untyped?) -> untyped
end
end

module Arel
class Table
def initialize: (untyped name, ?type_caster: untyped type_caster, ?as: untyped? as, ?klass: untyped?) -> void
end
end
8 changes: 7 additions & 1 deletion gems/activerecord/7.0/activerecord-7.0.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,17 @@ module ActiveRecord
@record_timestamps: bool

def initialize: (untyped model, untyped inserts, on_duplicate: untyped, ?unique_by: untyped?, ?returning: untyped?, ?record_timestamps: bool?) -> untyped

def record_timestamps?: () -> bool

def keys_including_timestamps: () -> Set[String]

def timestamps_for_create: () -> Hash[String, String]
end
end

module Arel
class Table
def initialize: (untyped name, ?type_caster: untyped type_caster, ?as: untyped? as, ?klass: untyped?) -> void
end
end
12 changes: 9 additions & 3 deletions gems/activerecord/7.1/activerecord-7.1.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ module ActiveRecord

class MismatchedForeignKey < StatementInvalid
def initialize: (?message: untyped?, ?sql: untyped?, ?binds: untyped?, ?table: untyped?,
?foreign_key: untyped?, ?target_table: untyped?, ?primary_key: untyped?,
?primary_key_column: untyped?, ?query_parser: untyped?,
?foreign_key: untyped?, ?target_table: untyped?, ?primary_key: untyped?,
?primary_key_column: untyped?, ?query_parser: untyped?,
?connection_pool: ConnectionAdapters::ConnectionPool?) -> void
end

Expand All @@ -114,7 +114,7 @@ module ActiveRecord
@record_timestamps: bool

def initialize: (untyped model, untyped inserts, on_duplicate: untyped, ?unique_by: untyped?, ?returning: untyped?, ?record_timestamps: bool?) -> untyped

def record_timestamps?: () -> bool

def keys_including_timestamps: () -> Set[String]
Expand All @@ -123,6 +123,12 @@ module ActiveRecord
end
end

module Arel
class Table
def initialize: (untyped name, ?type_caster: untyped type_caster, ?as: untyped? as, ?klass: untyped?) -> void
end
end

module ActiveRecord
class Relation
module Methods[Model, PrimaryKey]
Expand Down

0 comments on commit 963dd0c

Please sign in to comment.