searchcraft 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gem_rbs_collection/actionpack/6.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/actionpack/6.0/actioncontroller.rbs +127 -0
- data/.gem_rbs_collection/actionpack/6.0/actionpack-generated.rbs +12094 -0
- data/.gem_rbs_collection/actionpack/6.0/patch.rbs +93 -0
- data/.gem_rbs_collection/actionview/6.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/actionview/6.0/actionview-generated.rbs +10768 -0
- data/.gem_rbs_collection/actionview/6.0/patch.rbs +64 -0
- data/.gem_rbs_collection/activemodel/7.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/activemodel/7.0/activemodel-7.0.rbs +1 -0
- data/.gem_rbs_collection/activemodel/7.0/activemodel-generated.rbs +4319 -0
- data/.gem_rbs_collection/activemodel/7.0/manifest.yaml +12 -0
- data/.gem_rbs_collection/activemodel/7.0/patch.rbs +20 -0
- data/.gem_rbs_collection/activerecord/7.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/activerecord/7.0/activerecord-7.0.rbs +21 -0
- data/.gem_rbs_collection/activerecord/7.0/activerecord-generated.rbs +24943 -0
- data/.gem_rbs_collection/activerecord/7.0/activerecord.rbs +563 -0
- data/.gem_rbs_collection/activerecord/7.0/manifest.yaml +12 -0
- data/.gem_rbs_collection/activerecord/7.0/patch.rbs +41 -0
- data/.gem_rbs_collection/activerecord/7.0/railties.rbs +120 -0
- data/.gem_rbs_collection/activesupport/7.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/activesupport/7.0/activesupport-7.0.rbs +51 -0
- data/.gem_rbs_collection/activesupport/7.0/activesupport-generated.rbs +12672 -0
- data/.gem_rbs_collection/activesupport/7.0/activesupport.rbs +237 -0
- data/.gem_rbs_collection/activesupport/7.0/manifest.yaml +14 -0
- data/.gem_rbs_collection/activesupport/7.0/patch.rbs +89 -0
- data/.gem_rbs_collection/ast/2.4/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/ast/2.4/ast.rbs +73 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/executor.rbs +26 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/promises.rbs +249 -0
- data/.gem_rbs_collection/concurrent-ruby/1.1/utility/processor_counter.rbs +5 -0
- data/.gem_rbs_collection/i18n/1.10/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/i18n/1.10/backend.rbs +269 -0
- data/.gem_rbs_collection/i18n/1.10/i18n.rbs +117 -0
- data/.gem_rbs_collection/listen/3.2/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/listen/3.2/listen.rbs +25 -0
- data/.gem_rbs_collection/listen/3.2/listener.rbs +24 -0
- data/.gem_rbs_collection/nokogiri/1.11/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/nokogiri/1.11/nokogiri.rbs +2332 -0
- data/.gem_rbs_collection/nokogiri/1.11/patch.rbs +4 -0
- data/.gem_rbs_collection/rack/2.2/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rack/2.2/manifest.yaml +3 -0
- data/.gem_rbs_collection/rack/2.2/rack.rbs +1433 -0
- data/.gem_rbs_collection/rails-dom-testing/2.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rails-dom-testing/2.0/rails-dom-testing.rbs +55 -0
- data/.gem_rbs_collection/railties/6.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/railties/6.0/manifest.yaml +2 -0
- data/.gem_rbs_collection/railties/6.0/patch.rbs +56 -0
- data/.gem_rbs_collection/railties/6.0/railties-generated.rbs +4858 -0
- data/.gem_rbs_collection/rainbow/3.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rainbow/3.0/global.rbs +7 -0
- data/.gem_rbs_collection/rainbow/3.0/presenter.rbs +209 -0
- data/.gem_rbs_collection/rainbow/3.0/rainbow.rbs +5 -0
- data/.gem_rbs_collection/rake/13.0/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/rake/13.0/manifest.yaml +2 -0
- data/.gem_rbs_collection/rake/13.0/rake.rbs +28 -0
- data/.gem_rbs_collection/thor/1.2/.rbs_meta.yaml +9 -0
- data/.gem_rbs_collection/thor/1.2/manifest.yaml +7 -0
- data/.gem_rbs_collection/thor/1.2/thor.rbs +15 -0
- data/.overcommit.yml +10 -27
- data/.standard.yml +1 -1
- data/CHANGELOG.md +18 -3
- data/README.md +85 -1
- data/lib/searchcraft/annotate.rb +0 -2
- data/lib/searchcraft/builder.rb +5 -2
- data/lib/searchcraft/configuration.rb +19 -0
- data/lib/searchcraft/depends_on.rb +5 -12
- data/lib/searchcraft/dump_schema.rb +0 -2
- data/lib/searchcraft/model.rb +34 -32
- data/lib/searchcraft/text_search.rb +31 -0
- data/lib/searchcraft/version.rb +1 -1
- data/lib/searchcraft/view_hash_store.rb +2 -1
- data/lib/searchcraft.rb +2 -1
- data/rbs_collection.lock.yaml +174 -0
- data/rbs_collection.yaml +21 -0
- data/sig/ext/misc.rbs +33 -0
- data/sig/manifest.yaml +5 -0
- data/sig/searchcraft/annotate.rbs +7 -0
- data/sig/searchcraft/builder.rbs +58 -0
- data/sig/searchcraft/configuration.rbs +31 -0
- data/sig/searchcraft/depends_on.rbs +17 -0
- data/sig/searchcraft/dump_schema.rbs +5 -0
- data/sig/searchcraft/model.rbs +19 -0
- data/sig/searchcraft/railtie.rbs +5 -0
- data/sig/searchcraft/text_search.rbs +11 -0
- data/sig/searchcraft/view_hash_store.rbs +17 -0
- data/sig/searchcraft.rbs +17 -1
- metadata +86 -14
- data/Rakefile +0 -14
@@ -0,0 +1,563 @@
|
|
1
|
+
module ActiveRecord
|
2
|
+
class Base
|
3
|
+
# puts ActiveRecord::Base.singleton_class.ancestors.map(&:to_s).select { |s| /ClassMethods$/.match?(s) }.map{ |s| "extend ::#{s}" }.sort
|
4
|
+
extend ::ActiveModel::AttributeMethods::ClassMethods
|
5
|
+
extend ::ActiveModel::Conversion::ClassMethods
|
6
|
+
extend ::ActiveModel::SecurePassword::ClassMethods
|
7
|
+
extend ::ActiveModel::Validations::Callbacks::ClassMethods
|
8
|
+
extend ::ActiveModel::Validations::ClassMethods
|
9
|
+
extend ::ActiveRecord::Associations::ClassMethods
|
10
|
+
extend ::ActiveRecord::AttributeMethods::ClassMethods
|
11
|
+
extend ::ActiveRecord::AttributeMethods::PrimaryKey::ClassMethods
|
12
|
+
extend ::ActiveRecord::AttributeMethods::Read::ClassMethods
|
13
|
+
extend ::ActiveRecord::AttributeMethods::Serialization::ClassMethods
|
14
|
+
extend ::ActiveRecord::AttributeMethods::TimeZoneConversion::ClassMethods
|
15
|
+
extend ::ActiveRecord::AttributeMethods::Write::ClassMethods
|
16
|
+
extend ::ActiveRecord::Attributes::ClassMethods
|
17
|
+
extend ::ActiveRecord::AutosaveAssociation::ClassMethods
|
18
|
+
extend ::ActiveRecord::Core::ClassMethods
|
19
|
+
extend ::ActiveRecord::CounterCache::ClassMethods
|
20
|
+
extend ::ActiveRecord::Inheritance::ClassMethods
|
21
|
+
extend ::ActiveRecord::Integration::ClassMethods
|
22
|
+
extend ::ActiveRecord::Locking::Optimistic::ClassMethods
|
23
|
+
extend ::ActiveRecord::ModelSchema::ClassMethods
|
24
|
+
extend ::ActiveRecord::NestedAttributes::ClassMethods
|
25
|
+
extend ::ActiveRecord::NoTouching::ClassMethods
|
26
|
+
extend ::ActiveRecord::Persistence::ClassMethods
|
27
|
+
extend ::ActiveRecord::ReadonlyAttributes::ClassMethods
|
28
|
+
extend ::ActiveRecord::Reflection::ClassMethods
|
29
|
+
extend ::ActiveRecord::Sanitization::ClassMethods
|
30
|
+
extend ::ActiveRecord::Scoping::ClassMethods
|
31
|
+
extend ::ActiveRecord::Scoping::Default::ClassMethods
|
32
|
+
extend ::ActiveRecord::Scoping::Named::ClassMethods
|
33
|
+
extend ::ActiveRecord::SecureToken::ClassMethods
|
34
|
+
extend ::ActiveRecord::Store::ClassMethods
|
35
|
+
extend ::ActiveRecord::Suppressor::ClassMethods
|
36
|
+
extend ::ActiveRecord::Timestamp::ClassMethods
|
37
|
+
extend ::ActiveRecord::Transactions::ClassMethods
|
38
|
+
extend ::ActiveRecord::Validations::ClassMethods
|
39
|
+
extend ::ActiveSupport::Callbacks::ClassMethods
|
40
|
+
|
41
|
+
def self.abstract_class=: (bool) -> void
|
42
|
+
def self.scope: (Symbol, Proc) ?{ () -> untyped } -> void
|
43
|
+
def self.belongs_to: (Symbol, ?untyped, **untyped) -> void
|
44
|
+
def self.has_many: (Symbol, ?untyped, **untyped) -> void
|
45
|
+
def self.has_one: (Symbol, ?untyped, **untyped) -> void
|
46
|
+
def self.has_and_belongs_to_many: (untyped name, ?untyped? scope, **untyped options) ?{ () -> untyped } -> untyped
|
47
|
+
def self.transaction: [T] () { () -> T } -> T
|
48
|
+
def self.create: (**untyped) -> instance
|
49
|
+
def self.create!: (**untyped) -> instance
|
50
|
+
def self.validate: (*untyped) -> void
|
51
|
+
def self.validates: (*untyped) -> void
|
52
|
+
|
53
|
+
# callbacks
|
54
|
+
type callback = Symbol | ^(instance) [self: instance] -> void
|
55
|
+
type around_callback = Symbol | ^(instance, Proc) [self: instance] -> void
|
56
|
+
type condition = Symbol | ^() [self: instance] -> boolish
|
57
|
+
def self.after_commit: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
58
|
+
def self.after_create_commit: (*callback, ?if: condition, ?unless: condition, **untyped) -> void | ...
|
59
|
+
def self.after_update_commit: (*callback, ?if: condition, ?unless: condition, **untyped) -> void | ...
|
60
|
+
def self.after_destroy_commit: (*callback, ?if: condition, ?unless: condition, **untyped) -> void | ...
|
61
|
+
def self.after_save_commit: (*callback, ?if: condition, ?unless: condition, **untyped) -> void | ...
|
62
|
+
def self.after_create: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
63
|
+
def self.after_destroy: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
64
|
+
def self.after_rollback: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
65
|
+
def self.after_save: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
66
|
+
def self.after_update: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
67
|
+
def self.after_validation: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
68
|
+
def self.after_initialize: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
69
|
+
def self.after_find: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
70
|
+
def self.after_touch: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
71
|
+
def self.around_create: (*around_callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
72
|
+
def self.around_destroy: (*around_callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
73
|
+
def self.around_save: (*around_callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
74
|
+
def self.around_update: (*around_callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
75
|
+
def self.before_create: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
76
|
+
def self.before_destroy: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
77
|
+
def self.before_save: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
78
|
+
def self.before_update: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
79
|
+
def self.before_validation: (*callback, ?if: condition, ?unless: condition, **untyped) ?{ () [self: instance] -> untyped } -> void
|
80
|
+
|
81
|
+
def self.columns: () -> Array[untyped]
|
82
|
+
def self.reflect_on_all_associations: (?Symbol) -> Array[untyped]
|
83
|
+
|
84
|
+
def will_save_change_to_attribute?: (String | Symbol attr_name, ?from: untyped, ?to: untyped) -> bool
|
85
|
+
|
86
|
+
def save!: (?validate: bool, ?touch: bool) -> self
|
87
|
+
def save: () -> bool
|
88
|
+
def update!: (*untyped) -> self
|
89
|
+
def update: (*untyped) -> bool
|
90
|
+
def destroy!: () -> self
|
91
|
+
def destroy: () -> bool
|
92
|
+
def valid?: () -> bool
|
93
|
+
def invalid?: () -> bool
|
94
|
+
def errors: () -> untyped
|
95
|
+
def []: (Symbol) -> untyped
|
96
|
+
def []=: (Symbol, untyped) -> untyped
|
97
|
+
|
98
|
+
# class_attributes
|
99
|
+
def self.defined_enums: () -> untyped
|
100
|
+
def self.defined_enums?: () -> bool
|
101
|
+
def self.defined_enums=: (untyped) -> untyped
|
102
|
+
def defined_enums: () -> untyped
|
103
|
+
def defined_enums?: () -> bool
|
104
|
+
|
105
|
+
def self.default_connection_handler: () -> untyped
|
106
|
+
def self.default_connection_handler?: () -> bool
|
107
|
+
def self.default_connection_handler=: (untyped) -> untyped
|
108
|
+
def default_connection_handler: () -> untyped
|
109
|
+
def default_connection_handler?: () -> bool
|
110
|
+
|
111
|
+
def self.table_name_prefix: () -> untyped
|
112
|
+
def self.table_name_prefix?: () -> bool
|
113
|
+
def self.table_name_prefix=: (untyped) -> untyped
|
114
|
+
def table_name_prefix: () -> untyped
|
115
|
+
def table_name_prefix?: () -> bool
|
116
|
+
|
117
|
+
def self.table_name_suffix: () -> untyped
|
118
|
+
def self.table_name_suffix?: () -> bool
|
119
|
+
def self.table_name_suffix=: (untyped) -> untyped
|
120
|
+
def table_name_suffix: () -> untyped
|
121
|
+
def table_name_suffix?: () -> bool
|
122
|
+
|
123
|
+
def self.schema_migrations_table_name: () -> untyped
|
124
|
+
def self.schema_migrations_table_name?: () -> bool
|
125
|
+
def self.schema_migrations_table_name=: (untyped) -> untyped
|
126
|
+
|
127
|
+
def self.internal_metadata_table_name: () -> untyped
|
128
|
+
def self.internal_metadata_table_name?: () -> bool
|
129
|
+
def self.internal_metadata_table_name=: (untyped) -> untyped
|
130
|
+
|
131
|
+
def self.pluralize_table_names: () -> untyped
|
132
|
+
def self.pluralize_table_names?: () -> bool
|
133
|
+
def self.pluralize_table_names=: (untyped) -> untyped
|
134
|
+
def pluralize_table_names: () -> untyped
|
135
|
+
def pluralize_table_names?: () -> bool
|
136
|
+
|
137
|
+
def self.implicit_order_column: () -> untyped
|
138
|
+
def self.implicit_order_column?: () -> bool
|
139
|
+
def self.implicit_order_column=: (untyped) -> untyped
|
140
|
+
|
141
|
+
def self.store_full_sti_class: () -> untyped
|
142
|
+
def self.store_full_sti_class?: () -> bool
|
143
|
+
def self.store_full_sti_class=: (untyped) -> untyped
|
144
|
+
def store_full_sti_class: () -> untyped
|
145
|
+
def store_full_sti_class?: () -> bool
|
146
|
+
|
147
|
+
def self.default_scopes: () -> untyped
|
148
|
+
def self.default_scopes=: (untyped) -> untyped
|
149
|
+
def default_scopes: () -> untyped
|
150
|
+
|
151
|
+
def self.default_scope_override: () -> untyped
|
152
|
+
def self.default_scope_override=: (untyped) -> untyped
|
153
|
+
def default_scope_override: () -> untyped
|
154
|
+
|
155
|
+
def self.unscoped: () -> untyped | ...
|
156
|
+
|
157
|
+
def self.cache_timestamp_format: () -> untyped
|
158
|
+
def self.cache_timestamp_format?: () -> bool
|
159
|
+
def self.cache_timestamp_format=: (untyped) -> untyped
|
160
|
+
def cache_timestamp_format: () -> untyped
|
161
|
+
def cache_timestamp_format?: () -> bool
|
162
|
+
|
163
|
+
def self.cache_versioning: () -> untyped
|
164
|
+
def self.cache_versioning?: () -> bool
|
165
|
+
def self.cache_versioning=: (untyped) -> untyped
|
166
|
+
def cache_versioning: () -> untyped
|
167
|
+
def cache_versioning?: () -> bool
|
168
|
+
|
169
|
+
def self.collection_cache_versioning: () -> untyped
|
170
|
+
def self.collection_cache_versioning?: () -> bool
|
171
|
+
def self.collection_cache_versioning=: (untyped) -> untyped
|
172
|
+
def collection_cache_versioning: () -> untyped
|
173
|
+
def collection_cache_versioning?: () -> bool
|
174
|
+
|
175
|
+
def self.lock_optimistically: () -> untyped
|
176
|
+
def self.lock_optimistically?: () -> bool
|
177
|
+
def self.lock_optimistically=: (untyped) -> untyped
|
178
|
+
def lock_optimistically: () -> untyped
|
179
|
+
def lock_optimistically?: () -> bool
|
180
|
+
|
181
|
+
def self.attribute_aliases: () -> untyped
|
182
|
+
def self.attribute_aliases?: () -> bool
|
183
|
+
def self.attribute_aliases=: (untyped) -> untyped
|
184
|
+
def attribute_aliases: () -> untyped
|
185
|
+
def attribute_aliases?: () -> bool
|
186
|
+
|
187
|
+
def self.attribute_method_matchers: () -> untyped
|
188
|
+
def self.attribute_method_matchers?: () -> bool
|
189
|
+
def self.attribute_method_matchers=: (untyped) -> untyped
|
190
|
+
def attribute_method_matchers: () -> untyped
|
191
|
+
def attribute_method_matchers?: () -> bool
|
192
|
+
|
193
|
+
def self.skip_time_zone_conversion_for_attributes: () -> untyped
|
194
|
+
def self.skip_time_zone_conversion_for_attributes?: () -> bool
|
195
|
+
def self.skip_time_zone_conversion_for_attributes=: (untyped) -> untyped
|
196
|
+
def skip_time_zone_conversion_for_attributes: () -> untyped
|
197
|
+
def skip_time_zone_conversion_for_attributes?: () -> bool
|
198
|
+
|
199
|
+
def self.time_zone_aware_types: () -> untyped
|
200
|
+
def self.time_zone_aware_types?: () -> bool
|
201
|
+
def self.time_zone_aware_types=: (untyped) -> untyped
|
202
|
+
def time_zone_aware_types: () -> untyped
|
203
|
+
def time_zone_aware_types?: () -> bool
|
204
|
+
|
205
|
+
def self.partial_writes: () -> untyped
|
206
|
+
def self.partial_writes?: () -> bool
|
207
|
+
def self.partial_writes=: (untyped) -> untyped
|
208
|
+
def partial_writes: () -> untyped
|
209
|
+
def partial_writes?: () -> bool
|
210
|
+
|
211
|
+
def self.record_timestamps: () -> untyped
|
212
|
+
def self.record_timestamps?: () -> bool
|
213
|
+
def self.record_timestamps=: (untyped) -> untyped
|
214
|
+
def record_timestamps: () -> untyped
|
215
|
+
def record_timestamps?: () -> bool
|
216
|
+
def record_timestamps=: (untyped) -> untyped
|
217
|
+
|
218
|
+
def self.nested_attributes_options: () -> untyped
|
219
|
+
def self.nested_attributes_options?: () -> bool
|
220
|
+
def self.nested_attributes_options=: (untyped) -> untyped
|
221
|
+
def nested_attributes_options: () -> untyped
|
222
|
+
def nested_attributes_options?: () -> bool
|
223
|
+
|
224
|
+
def self.aggregate_reflections: () -> untyped
|
225
|
+
def self.aggregate_reflections?: () -> bool
|
226
|
+
def self.aggregate_reflections=: (untyped) -> untyped
|
227
|
+
def aggregate_reflections: () -> untyped
|
228
|
+
def aggregate_reflections?: () -> bool
|
229
|
+
|
230
|
+
def self.include_root_in_json: () -> untyped
|
231
|
+
def self.include_root_in_json?: () -> bool
|
232
|
+
def self.include_root_in_json=: (untyped) -> untyped
|
233
|
+
def include_root_in_json: () -> untyped
|
234
|
+
def include_root_in_json?: () -> bool
|
235
|
+
|
236
|
+
# mattr_accessor
|
237
|
+
attr_accessor self.logger: untyped
|
238
|
+
def logger: () -> untyped
|
239
|
+
|
240
|
+
attr_accessor self.verbose_query_logs: untyped
|
241
|
+
def verbose_query_logs: () -> untyped
|
242
|
+
|
243
|
+
attr_accessor self.default_timezone: untyped
|
244
|
+
def default_timezone: () -> untyped
|
245
|
+
|
246
|
+
attr_accessor self.schema_format: untyped
|
247
|
+
def schema_format: () -> untyped
|
248
|
+
|
249
|
+
attr_accessor self.error_on_ignored_order: untyped
|
250
|
+
def error_on_ignored_order: () -> untyped
|
251
|
+
|
252
|
+
attr_accessor self.allow_unsafe_raw_sql: untyped
|
253
|
+
def allow_unsafe_raw_sql: () -> untyped
|
254
|
+
|
255
|
+
attr_accessor self.timestamped_migrations: untyped
|
256
|
+
def timestamped_migrations: () -> untyped
|
257
|
+
|
258
|
+
attr_accessor self.dump_schema_after_migration: untyped
|
259
|
+
def dump_schema_after_migration: () -> untyped
|
260
|
+
|
261
|
+
attr_accessor self.dump_schemas: untyped
|
262
|
+
def dump_schemas: () -> untyped
|
263
|
+
|
264
|
+
attr_accessor self.warn_on_records_fetched_greater_than: untyped
|
265
|
+
def warn_on_records_fetched_greater_than: () -> untyped
|
266
|
+
|
267
|
+
attr_accessor self.maintain_test_schema: untyped
|
268
|
+
|
269
|
+
attr_accessor self.belongs_to_required_by_default: untyped
|
270
|
+
|
271
|
+
attr_accessor self.connection_handlers: untyped
|
272
|
+
|
273
|
+
attr_accessor self.writing_role: untyped
|
274
|
+
|
275
|
+
attr_accessor self.reading_role: untyped
|
276
|
+
|
277
|
+
attr_accessor self.primary_key_prefix_type: untyped
|
278
|
+
def primary_key_prefix_type: () -> untyped
|
279
|
+
|
280
|
+
attr_accessor self.time_zone_aware_attributes: untyped
|
281
|
+
def time_zone_aware_attributes: () -> untyped
|
282
|
+
|
283
|
+
attr_accessor self.index_nested_attribute_errors: untyped
|
284
|
+
def index_nested_attribute_errors: () -> untyped
|
285
|
+
|
286
|
+
private
|
287
|
+
|
288
|
+
def self.default_scope: (?untyped? scope) -> untyped | ...
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
interface _ActiveRecord_Relation[Model, PrimaryKey]
|
293
|
+
def all: () -> self
|
294
|
+
def ids: () -> Array[PrimaryKey]
|
295
|
+
def none: () -> self
|
296
|
+
def pluck: (Symbol | String column) -> Array[untyped]
|
297
|
+
| (*Symbol | String columns) -> Array[Array[untyped]]
|
298
|
+
def where: (*untyped) -> self
|
299
|
+
def not: (*untyped) -> self
|
300
|
+
def exists?: (*untyped) -> bool
|
301
|
+
def order: (*untyped) -> self
|
302
|
+
def group: (*Symbol | String) -> untyped
|
303
|
+
def distinct: () -> self
|
304
|
+
def or: (self) -> self
|
305
|
+
def merge: (Array[untyped] | Hash[untyped, untyped] | ActiveRecord::Relation | Proc) -> self
|
306
|
+
def joins: (*String | Symbol | Hash[untyped, untyped]) -> self
|
307
|
+
def left_joins: (*String | Symbol | Hash[untyped, untyped]) -> self
|
308
|
+
def left_outer_joins: (*String | Symbol | Hash[untyped, untyped]) -> self
|
309
|
+
def includes: (*String | Symbol | Hash[untyped, untyped]) -> self
|
310
|
+
def eager_load: (*String | Symbol | Hash[untyped, untyped]) -> self
|
311
|
+
def preload: (*String | Symbol | Hash[untyped, untyped]) -> self
|
312
|
+
def find_by: (*untyped) -> Model?
|
313
|
+
def find_by!: (*untyped) -> Model
|
314
|
+
def find: (PrimaryKey id) -> Model
|
315
|
+
| (Array[PrimaryKey]) -> Array[Model]
|
316
|
+
| (*PrimaryKey) -> Array[Model]
|
317
|
+
| () { (Model) -> boolish } -> Model?
|
318
|
+
def find_or_create_by: (*untyped) -> Model
|
319
|
+
| (*untyped) { (Model) -> void } -> Model
|
320
|
+
def find_or_create_by!: (*untyped) -> Model
|
321
|
+
| (*untyped) { (Model) -> void } -> Model
|
322
|
+
def find_or_initialize_by: (*untyped) -> Model
|
323
|
+
| (*untyped) { (Model) -> void } -> Model
|
324
|
+
def create_or_find_by: (*untyped) -> Model
|
325
|
+
| (*untyped) { (Model) -> void } -> Model
|
326
|
+
def create_or_find_by!: (*untyped) -> Model
|
327
|
+
| (*untyped) { (Model) -> void } -> Model
|
328
|
+
def take: () -> Model
|
329
|
+
| (Integer limit) -> Array[Model]
|
330
|
+
def take!: () -> Model
|
331
|
+
def first: () -> Model?
|
332
|
+
| (Integer count) -> Array[Model]
|
333
|
+
def first!: () -> Model
|
334
|
+
def second: () -> Model?
|
335
|
+
def second!: () -> Model
|
336
|
+
def third: () -> Model?
|
337
|
+
def third!: () -> Model
|
338
|
+
def fourth: () -> Model?
|
339
|
+
def fourth!: () -> Model
|
340
|
+
def fifth: () -> Model?
|
341
|
+
def fifth!: () -> Model
|
342
|
+
def forty_two: () -> Model?
|
343
|
+
def forty_two!: () -> Model
|
344
|
+
def second_to_last: () -> Model?
|
345
|
+
def second_to_last!: () -> Model
|
346
|
+
def third_to_last: () -> Model?
|
347
|
+
def third_to_last!: () -> Model
|
348
|
+
def last: () -> Model?
|
349
|
+
| (Integer count) -> Array[Model]
|
350
|
+
def last!: () -> Model
|
351
|
+
def limit: (Integer | Arel::Nodes::SqlLiteral | nil) -> self
|
352
|
+
def limit!: (Integer | Arel::Nodes::SqlLiteral | nil) -> self
|
353
|
+
def find_each: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (Model) -> void } -> nil
|
354
|
+
def find_in_batches: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (Array[Model]) -> void } -> nil
|
355
|
+
def in_batches: (?of: Integer, ?start: Integer, ?finish: Integer, ?load: bool, ?error_on_ignore: bool, ?order: untyped) { (self) -> void } -> nil
|
356
|
+
def destroy_all: () -> untyped
|
357
|
+
def delete_all: () -> untyped
|
358
|
+
def update_all: (*untyped) -> untyped
|
359
|
+
def touch_all: (*untyped, ?time: untyped) -> untyped
|
360
|
+
def destroy_by: (*untyped) -> untyped
|
361
|
+
def delete_by: (*untyped) -> untyped
|
362
|
+
def each: () { (Model) -> void } -> self
|
363
|
+
def select: (*Symbol | String) -> self
|
364
|
+
| () { (Model) -> boolish } -> Array[Model]
|
365
|
+
def reselect: (*Symbol | String) -> self
|
366
|
+
end
|
367
|
+
|
368
|
+
interface _ActiveRecord_Relation_ClassMethods[Model, Relation, PrimaryKey]
|
369
|
+
def all: () -> Relation
|
370
|
+
def ids: () -> Array[PrimaryKey]
|
371
|
+
def none: () -> Relation
|
372
|
+
def pluck: (Symbol | String column) -> Array[untyped]
|
373
|
+
| (*Symbol | String columns) -> Array[Array[untyped]]
|
374
|
+
def where: (*untyped) -> Relation
|
375
|
+
def exists?: (*untyped) -> bool
|
376
|
+
def any?: () -> bool
|
377
|
+
| () { (Model) -> boolish } -> bool
|
378
|
+
def many?: () -> bool
|
379
|
+
| () { (Model) -> boolish } -> bool
|
380
|
+
def none?: () -> bool
|
381
|
+
| () { (Model) -> boolish } -> bool
|
382
|
+
def one?: () -> bool
|
383
|
+
| () { (Model) -> boolish } -> bool
|
384
|
+
def order: (*untyped) -> Relation
|
385
|
+
def group: (*Symbol | String) -> untyped
|
386
|
+
def distinct: () -> Relation
|
387
|
+
def or: (Relation) -> Relation
|
388
|
+
def merge: (Array[untyped] | Hash[untyped, untyped] | ActiveRecord::Relation | Proc) -> Relation
|
389
|
+
def joins: (*String | Symbol | Hash[untyped, untyped]) -> Relation
|
390
|
+
def left_joins: (*String | Symbol | Hash[untyped, untyped]) -> Relation
|
391
|
+
def left_outer_joins: (*String | Symbol | Hash[untyped, untyped]) -> Relation
|
392
|
+
def includes: (*String | Symbol | Hash[untyped, untyped]) -> Relation
|
393
|
+
def eager_load: (*String | Symbol | Hash[untyped, untyped]) -> Relation
|
394
|
+
def preload: (*String | Symbol | Hash[untyped, untyped]) -> Relation
|
395
|
+
def find_by: (*untyped) -> Model?
|
396
|
+
def find_by!: (*untyped) -> Model
|
397
|
+
def find: (PrimaryKey id) -> Model
|
398
|
+
| (Array[PrimaryKey]) -> Array[Model]
|
399
|
+
| (*PrimaryKey) -> Array[Model]
|
400
|
+
def find_or_create_by: (*untyped) -> Model
|
401
|
+
| (*untyped) { (Model) -> void } -> Model
|
402
|
+
def find_or_create_by!: (*untyped) -> Model
|
403
|
+
| (*untyped) { (Model) -> void } -> Model
|
404
|
+
def find_or_initialize_by: (*untyped) -> Model
|
405
|
+
| (*untyped) { (Model) -> void } -> Model
|
406
|
+
def create_or_find_by: (*untyped) -> Model
|
407
|
+
| (*untyped) { (Model) -> void } -> Model
|
408
|
+
def create_or_find_by!: (*untyped) -> Model
|
409
|
+
| (*untyped) { (Model) -> void } -> Model
|
410
|
+
def take: () -> Model
|
411
|
+
| (Integer limit) -> Array[Model]
|
412
|
+
def take!: () -> Model
|
413
|
+
def first: () -> Model?
|
414
|
+
| (Integer count) -> Array[Model]
|
415
|
+
def first!: () -> Model
|
416
|
+
def second: () -> Model?
|
417
|
+
def second!: () -> Model
|
418
|
+
def third: () -> Model?
|
419
|
+
def third!: () -> Model
|
420
|
+
def fourth: () -> Model?
|
421
|
+
def fourth!: () -> Model
|
422
|
+
def fifth: () -> Model?
|
423
|
+
def fifth!: () -> Model
|
424
|
+
def forty_two: () -> Model?
|
425
|
+
def forty_two!: () -> Model
|
426
|
+
def second_to_last: () -> Model?
|
427
|
+
def second_to_last!: () -> Model
|
428
|
+
def third_to_last: () -> Model?
|
429
|
+
def third_to_last!: () -> Model
|
430
|
+
def last: () -> Model?
|
431
|
+
| (Integer count) -> Array[Model]
|
432
|
+
def last!: () -> Model
|
433
|
+
def limit: (Integer | Arel::Nodes::SqlLiteral | nil) -> Relation
|
434
|
+
def lock: (?untyped locks) -> Relation
|
435
|
+
def find_each: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (Model) -> void } -> nil
|
436
|
+
def find_in_batches: (?batch_size: Integer, ?start: Integer, ?finish: Integer, ?error_on_ignore: bool) { (Array[Model]) -> void } -> nil
|
437
|
+
def in_batches: (?of: Integer, ?start: Integer, ?finish: Integer, ?load: bool, ?error_on_ignore: bool, ?order: untyped) { (Relation) -> void } -> nil
|
438
|
+
def destroy_all: () -> untyped
|
439
|
+
def delete_all: () -> untyped
|
440
|
+
def update_all: (*untyped) -> untyped
|
441
|
+
def touch_all: (*untyped, ?time: untyped) -> untyped
|
442
|
+
def destroy_by: (*untyped) -> untyped
|
443
|
+
def delete_by: (*untyped) -> untyped
|
444
|
+
def select: (*Symbol | String) -> Relation
|
445
|
+
| () { (Model) -> boolish } -> Array[Model]
|
446
|
+
def reselect: (*Symbol | String) -> Relation
|
447
|
+
def scope: (Symbol, ^(*untyped, **untyped) [self: Relation] -> void }) ?{ (Module extention) [self: Relation] -> void } -> void
|
448
|
+
end
|
449
|
+
|
450
|
+
# https://github.com/rails/rails/blob/fbe2433be6e052a1acac63c7faf287c52ed3c5ba/activerecord/lib/arel/nodes/unary.rb
|
451
|
+
module Arel
|
452
|
+
module Nodes
|
453
|
+
class Bin < Unary
|
454
|
+
end
|
455
|
+
class Cube < Unary
|
456
|
+
end
|
457
|
+
class DistinctOn < Unary
|
458
|
+
end
|
459
|
+
class Group < Unary
|
460
|
+
end
|
461
|
+
class GroupingElement < Unary
|
462
|
+
end
|
463
|
+
class GroupingSet < Unary
|
464
|
+
end
|
465
|
+
class Lateral < Unary
|
466
|
+
end
|
467
|
+
class Limit < Unary
|
468
|
+
end
|
469
|
+
class Lock < Unary
|
470
|
+
end
|
471
|
+
class Not < Unary
|
472
|
+
end
|
473
|
+
class Offset < Unary
|
474
|
+
end
|
475
|
+
class On < Unary
|
476
|
+
end
|
477
|
+
class OptimizerHints < Unary
|
478
|
+
end
|
479
|
+
class Ordering < Unary
|
480
|
+
end
|
481
|
+
class RollUp < Unary
|
482
|
+
end
|
483
|
+
end
|
484
|
+
end
|
485
|
+
|
486
|
+
# https://github.com/rails/rails/blob/fbe2433be6e052a1acac63c7faf287c52ed3c5ba/activerecord/lib/arel/nodes/binary.rb
|
487
|
+
module Arel
|
488
|
+
module Nodes
|
489
|
+
class As < Binary
|
490
|
+
end
|
491
|
+
class Assignment < Binary
|
492
|
+
end
|
493
|
+
class Between < Binary
|
494
|
+
end
|
495
|
+
class GreaterThan < Binary
|
496
|
+
end
|
497
|
+
class GreaterThanOrEqual < Binary
|
498
|
+
end
|
499
|
+
class Join < Binary
|
500
|
+
end
|
501
|
+
class LessThan < Binary
|
502
|
+
end
|
503
|
+
class LessThanOrEqual < Binary
|
504
|
+
end
|
505
|
+
class NotEqual < Binary
|
506
|
+
end
|
507
|
+
class NotIn < Binary
|
508
|
+
end
|
509
|
+
class Or < Binary
|
510
|
+
end
|
511
|
+
class Union < Binary
|
512
|
+
end
|
513
|
+
class UnionAll < Binary
|
514
|
+
end
|
515
|
+
class Intersect < Binary
|
516
|
+
end
|
517
|
+
class Except < Binary
|
518
|
+
end
|
519
|
+
end
|
520
|
+
end
|
521
|
+
|
522
|
+
# https://github.com/rails/rails/blob/fbe2433be6e052a1acac63c7faf287c52ed3c5ba/activerecord/lib/arel/nodes/equality.rb
|
523
|
+
module Arel
|
524
|
+
module Nodes
|
525
|
+
class IsDistinctFrom < Equality
|
526
|
+
end
|
527
|
+
|
528
|
+
class IsNotDistinctFrom < Equality
|
529
|
+
end
|
530
|
+
end
|
531
|
+
end
|
532
|
+
|
533
|
+
# https://github.com/rails/rails/blob/fbe2433be6e052a1acac63c7faf287c52ed3c5ba/activerecord/lib/arel/nodes/function.rb
|
534
|
+
module Arel
|
535
|
+
module Nodes
|
536
|
+
class Sum < Function
|
537
|
+
end
|
538
|
+
class Exists < Function
|
539
|
+
end
|
540
|
+
class Max < Function
|
541
|
+
end
|
542
|
+
class Min < Function
|
543
|
+
end
|
544
|
+
class Avg < Function
|
545
|
+
end
|
546
|
+
end
|
547
|
+
end
|
548
|
+
|
549
|
+
module ActiveRecord
|
550
|
+
class Base
|
551
|
+
extend Associations::ClassMethods
|
552
|
+
end
|
553
|
+
end
|
554
|
+
|
555
|
+
module ActiveRecord
|
556
|
+
module Associations
|
557
|
+
class CollectionProxy
|
558
|
+
def build: (?::Hash[untyped, untyped] attributes) -> untyped | ...
|
559
|
+
def create: (?::Hash[untyped, untyped] attributes) -> untyped | ...
|
560
|
+
def create!: (?::Hash[untyped, untyped] attributes) -> untyped | ...
|
561
|
+
end
|
562
|
+
end
|
563
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# manifest.yaml describes dependencies which do not appear in the gemspec.
|
2
|
+
# If this gem includes such dependencies, comment-out the following lines and
|
3
|
+
# declare the dependencies.
|
4
|
+
# If all dependencies appear in the gemspec, you should remove this file.
|
5
|
+
#
|
6
|
+
dependencies:
|
7
|
+
- name: date
|
8
|
+
- name: logger
|
9
|
+
- name: monitor
|
10
|
+
- name: mutex_m
|
11
|
+
- name: singleton
|
12
|
+
- name: time
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module ActiveRecord
|
2
|
+
class Relation
|
3
|
+
# It is necessary to satisfy alias target.
|
4
|
+
# TODO: Define this method to correct place.
|
5
|
+
def lock_value: () -> untyped
|
6
|
+
end
|
7
|
+
|
8
|
+
module QueryMethods
|
9
|
+
# It is defined with meta programming
|
10
|
+
def extending_values: () -> untyped
|
11
|
+
end
|
12
|
+
|
13
|
+
class Migration
|
14
|
+
class CommandRecorder
|
15
|
+
# They are defined with meta programming
|
16
|
+
def add_reference: (*untyped) -> untyped
|
17
|
+
def remove_reference: (*untyped) -> untyped
|
18
|
+
def invert_add_reference: (*untyped) -> untyped
|
19
|
+
def invert_remove_reference: (*untyped) -> untyped
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
# Remove the fake PG type if the real type is available
|
25
|
+
module PG
|
26
|
+
class Connection
|
27
|
+
def async_exec: (*untyped) -> untyped
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# Remove the fake SimpleDelegator type
|
32
|
+
# if the real types are available.
|
33
|
+
class SimpleDelegator
|
34
|
+
end
|
35
|
+
|
36
|
+
# Remove the fake types for Gem::Version
|
37
|
+
# if the real types are available.
|
38
|
+
module Gem
|
39
|
+
class Version
|
40
|
+
end
|
41
|
+
end
|