Skip to content

Commit

Permalink
Update specs
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffcarbs committed Nov 20, 2023
1 parent c6cdf9c commit ff9734a
Showing 1 changed file with 56 additions and 6 deletions.
62 changes: 56 additions & 6 deletions spec/tapioca/dsl/compilers/active_record_relations_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ module CommonRelationMethods
sig { params(block: T.nilable(T.proc.params(record: ::Post).returns(T.untyped))).returns(T::Boolean) }
def any?(&block); end
sig { params(column_name: T.any(String, Symbol)).returns(T.untyped) }
sig { params(column_name: T.any(String, Symbol)).returns(Numeric) }
def average(column_name); end
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ::Post).void)).returns(::Post) }
def build(attributes = nil, &block); end
sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T.untyped) }
sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(Numeric) }
def calculate(operation, column_name); end
sig { params(column_name: T.untyped).returns(T.untyped) }
sig { params(column_name: T.untyped).returns(Integer) }
def count(column_name = nil); end
sig { params(attributes: T.untyped, block: T.nilable(T.proc.params(object: ::Post).void)).returns(::Post) }
Expand Down Expand Up @@ -208,7 +208,7 @@ def second_to_last!; end
def sole; end
<% end %>
sig { params(column_name: T.nilable(T.any(String, Symbol)), block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped))).returns(T.untyped) }
sig { params(column_name: T.nilable(T.any(String, Symbol)), block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped))).returns(Numeric) }
def sum(column_name = nil, &block); end
sig { params(limit: T.untyped).returns(T.untyped) }
Expand Down Expand Up @@ -266,7 +266,7 @@ def extract_associated(*args, &blk); end
sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) }
def from(*args, &blk); end
sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) }
sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelationGroupChain) }
def group(*args, &blk); end
sig { params(args: T.untyped, blk: T.untyped).returns(PrivateAssociationRelation) }
Expand Down Expand Up @@ -437,7 +437,7 @@ def extract_associated(*args, &blk); end
sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) }
def from(*args, &blk); end
sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) }
sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelationGroupChain) }
def group(*args, &blk); end
sig { params(args: T.untyped, blk: T.untyped).returns(PrivateRelation) }
Expand Down Expand Up @@ -567,6 +567,31 @@ def to_a; end
def to_ary; end
end
class PrivateAssociationRelationGroupChain < PrivateAssociationRelation
Elem = type_member { { fixed: ::Post } }
sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, Numeric]) }
def average(column_name); end
sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, Numeric]) }
def calculate(operation, column_name); end
sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) }
def count(column_name = nil); end
sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) }
def having(*args, &blk); end
sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) }
def maximum(column_name); end
sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) }
def minimum(column_name); end
sig { params(column_name: T.nilable(T.any(String, Symbol)), block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped))).returns(T::Hash[T.untyped, Numeric]) }
def sum(column_name = nil, &block); end
end
class PrivateAssociationRelationWhereChain < PrivateAssociationRelation
Elem = type_member { { fixed: ::Post } }
Expand Down Expand Up @@ -644,6 +669,31 @@ def to_a; end
def to_ary; end
end
class PrivateRelationGroupChain < PrivateRelation
Elem = type_member { { fixed: ::Post } }
sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, Numeric]) }
def average(column_name); end
sig { params(operation: Symbol, column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, Numeric]) }
def calculate(operation, column_name); end
sig { params(column_name: T.untyped).returns(T::Hash[T.untyped, Integer]) }
def count(column_name = nil); end
sig { params(args: T.untyped, blk: T.untyped).returns(T.self_type) }
def having(*args, &blk); end
sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) }
def maximum(column_name); end
sig { params(column_name: T.any(String, Symbol)).returns(T::Hash[T.untyped, T.untyped]) }
def minimum(column_name); end
sig { params(column_name: T.nilable(T.any(String, Symbol)), block: T.nilable(T.proc.params(record: T.untyped).returns(T.untyped))).returns(T::Hash[T.untyped, Numeric]) }
def sum(column_name = nil, &block); end
end
class PrivateRelationWhereChain < PrivateRelation
Elem = type_member { { fixed: ::Post } }
Expand Down

0 comments on commit ff9734a

Please sign in to comment.