• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mlange-42 / ark / 13521963365

25 Feb 2025 01:07PM CUT coverage: 69.617%. First build
13521963365

Pull #67

github

web-flow
Merge fb3821f8a into 5e435fa80
Pull Request #67: Code-gen tests for queries

0 of 11 new or added lines in 1 file covered. (0.0%)

2470 of 3548 relevant lines covered (69.62%)

50922.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

66.58
/ecs/filter_gen.go
1
package ecs
2

3
// Code generated by go generate; DO NOT EDIT.
4

5
// Filter0 is a filter for 0 components.
6
type Filter0 struct {
7
        world     *World
8
        ids       []ID
9
        mask      Mask
10
        without   Mask
11
        relations []relationID
12
}
13

14
// NewFilter0 creates a new [Filter0].
15
//
16
// Use [Filter0.Query] to obtain a [Query0].
17
func NewFilter0(world *World) *Filter0 {
6✔
18
        ids := []ID{}
6✔
19

6✔
20
        return &Filter0{
6✔
21
                world: world,
6✔
22
                ids:   ids,
6✔
23
                mask:  All(ids...),
6✔
24
        }
6✔
25
}
6✔
26

27
// With specifies additional components to filter for.
28
func (q *Filter0) With(comps ...Comp) *Filter0 {
×
29
        for _, c := range comps {
×
30
                id := q.world.componentID(c.tp)
×
31
                q.mask.Set(id, true)
×
32
        }
×
33
        return q
×
34
}
35

36
// With specifies components to exclude.
37
func (q *Filter0) Without(comps ...Comp) *Filter0 {
2✔
38
        for _, c := range comps {
4✔
39
                id := q.world.componentID(c.tp)
2✔
40
                q.without.Set(id, true)
2✔
41
        }
2✔
42
        return q
2✔
43
}
44

45
// Exclusive makes the filter exclusive in the sense that the component composition is matched exactly,
46
// and no other components are allowed.
47
func (q *Filter0) Exclusive() *Filter0 {
1✔
48
        q.without = q.mask.Not()
1✔
49
        return q
1✔
50
}
1✔
51

52
// Query creates a [Query0] from this filter.
53
// This must be used each time before iterating a query.
54
func (q *Filter0) Query(rel ...RelationIndex) Query0 {
7✔
55
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
7✔
56
        return newQuery0(q.world, q.mask, q.without, q.relations)
7✔
57
}
7✔
58

59
// Batch creates a [Batch] from this filter.
60
func (q *Filter0) Batch(rel ...RelationIndex) Batch {
×
61
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
×
62
        return Batch{
×
63
                mask:      q.mask,
×
64
                without:   q.without,
×
65
                relations: q.relations,
×
66
        }
×
67
}
×
68

69
// Filter1 is a filter for 1 components.
70
type Filter1[A any] struct {
71
        world     *World
72
        ids       []ID
73
        mask      Mask
74
        without   Mask
75
        relations []relationID
76
}
77

78
// NewFilter1 creates a new [Filter1].
79
//
80
// Use [Filter1.Query] to obtain a [Query1].
81
func NewFilter1[A any](world *World) *Filter1[A] {
1,005✔
82
        ids := []ID{
1,005✔
83
                ComponentID[A](world),
1,005✔
84
        }
1,005✔
85

1,005✔
86
        return &Filter1[A]{
1,005✔
87
                world: world,
1,005✔
88
                ids:   ids,
1,005✔
89
                mask:  All(ids...),
1,005✔
90
        }
1,005✔
91
}
1,005✔
92

93
// With specifies additional components to filter for.
94
func (q *Filter1[A]) With(comps ...Comp) *Filter1[A] {
×
95
        for _, c := range comps {
×
96
                id := q.world.componentID(c.tp)
×
97
                q.mask.Set(id, true)
×
98
        }
×
99
        return q
×
100
}
101

102
// With specifies components to exclude.
103
func (q *Filter1[A]) Without(comps ...Comp) *Filter1[A] {
1✔
104
        for _, c := range comps {
2✔
105
                id := q.world.componentID(c.tp)
1✔
106
                q.without.Set(id, true)
1✔
107
        }
1✔
108
        return q
1✔
109
}
110

111
// Exclusive makes the filter exclusive in the sense that the component composition is matched exactly,
112
// and no other components are allowed.
113
func (q *Filter1[A]) Exclusive() *Filter1[A] {
1✔
114
        q.without = q.mask.Not()
1✔
115
        return q
1✔
116
}
1✔
117

118
// Query creates a [Query1] from this filter.
119
// This must be used each time before iterating a query.
120
func (q *Filter1[A]) Query(rel ...RelationIndex) Query1[A] {
1,005✔
121
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
1,005✔
122
        return newQuery1[A](q.world, q.mask, q.without, q.ids, q.relations)
1,005✔
123
}
1,005✔
124

125
// Batch creates a [Batch] from this filter.
126
func (q *Filter1[A]) Batch(rel ...RelationIndex) Batch {
×
127
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
×
128
        return Batch{
×
129
                mask:      q.mask,
×
130
                without:   q.without,
×
131
                relations: q.relations,
×
132
        }
×
133
}
×
134

135
// Filter2 is a filter for 2 components.
136
type Filter2[A any, B any] struct {
137
        world     *World
138
        ids       []ID
139
        mask      Mask
140
        without   Mask
141
        relations []relationID
142
}
143

144
// NewFilter2 creates a new [Filter2].
145
//
146
// Use [Filter2.Query] to obtain a [Query2].
147
func NewFilter2[A any, B any](world *World) *Filter2[A, B] {
8✔
148
        ids := []ID{
8✔
149
                ComponentID[A](world),
8✔
150
                ComponentID[B](world),
8✔
151
        }
8✔
152

8✔
153
        return &Filter2[A, B]{
8✔
154
                world: world,
8✔
155
                ids:   ids,
8✔
156
                mask:  All(ids...),
8✔
157
        }
8✔
158
}
8✔
159

160
// With specifies additional components to filter for.
161
func (q *Filter2[A, B]) With(comps ...Comp) *Filter2[A, B] {
×
162
        for _, c := range comps {
×
163
                id := q.world.componentID(c.tp)
×
164
                q.mask.Set(id, true)
×
165
        }
×
166
        return q
×
167
}
168

169
// With specifies components to exclude.
170
func (q *Filter2[A, B]) Without(comps ...Comp) *Filter2[A, B] {
1✔
171
        for _, c := range comps {
2✔
172
                id := q.world.componentID(c.tp)
1✔
173
                q.without.Set(id, true)
1✔
174
        }
1✔
175
        return q
1✔
176
}
177

178
// Exclusive makes the filter exclusive in the sense that the component composition is matched exactly,
179
// and no other components are allowed.
180
func (q *Filter2[A, B]) Exclusive() *Filter2[A, B] {
1✔
181
        q.without = q.mask.Not()
1✔
182
        return q
1✔
183
}
1✔
184

185
// Query creates a [Query2] from this filter.
186
// This must be used each time before iterating a query.
187
func (q *Filter2[A, B]) Query(rel ...RelationIndex) Query2[A, B] {
8✔
188
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
8✔
189
        return newQuery2[A, B](q.world, q.mask, q.without, q.ids, q.relations)
8✔
190
}
8✔
191

192
// Batch creates a [Batch] from this filter.
193
func (q *Filter2[A, B]) Batch(rel ...RelationIndex) Batch {
×
194
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
×
195
        return Batch{
×
196
                mask:      q.mask,
×
197
                without:   q.without,
×
198
                relations: q.relations,
×
199
        }
×
200
}
×
201

202
// Filter3 is a filter for 3 components.
203
type Filter3[A any, B any, C any] struct {
204
        world     *World
205
        ids       []ID
206
        mask      Mask
207
        without   Mask
208
        relations []relationID
209
}
210

211
// NewFilter3 creates a new [Filter3].
212
//
213
// Use [Filter3.Query] to obtain a [Query3].
214
func NewFilter3[A any, B any, C any](world *World) *Filter3[A, B, C] {
6✔
215
        ids := []ID{
6✔
216
                ComponentID[A](world),
6✔
217
                ComponentID[B](world),
6✔
218
                ComponentID[C](world),
6✔
219
        }
6✔
220

6✔
221
        return &Filter3[A, B, C]{
6✔
222
                world: world,
6✔
223
                ids:   ids,
6✔
224
                mask:  All(ids...),
6✔
225
        }
6✔
226
}
6✔
227

228
// With specifies additional components to filter for.
229
func (q *Filter3[A, B, C]) With(comps ...Comp) *Filter3[A, B, C] {
×
230
        for _, c := range comps {
×
231
                id := q.world.componentID(c.tp)
×
232
                q.mask.Set(id, true)
×
233
        }
×
234
        return q
×
235
}
236

237
// With specifies components to exclude.
238
func (q *Filter3[A, B, C]) Without(comps ...Comp) *Filter3[A, B, C] {
1✔
239
        for _, c := range comps {
2✔
240
                id := q.world.componentID(c.tp)
1✔
241
                q.without.Set(id, true)
1✔
242
        }
1✔
243
        return q
1✔
244
}
245

246
// Exclusive makes the filter exclusive in the sense that the component composition is matched exactly,
247
// and no other components are allowed.
248
func (q *Filter3[A, B, C]) Exclusive() *Filter3[A, B, C] {
1✔
249
        q.without = q.mask.Not()
1✔
250
        return q
1✔
251
}
1✔
252

253
// Query creates a [Query3] from this filter.
254
// This must be used each time before iterating a query.
255
func (q *Filter3[A, B, C]) Query(rel ...RelationIndex) Query3[A, B, C] {
8✔
256
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
8✔
257
        return newQuery3[A, B, C](q.world, q.mask, q.without, q.ids, q.relations)
8✔
258
}
8✔
259

260
// Batch creates a [Batch] from this filter.
261
func (q *Filter3[A, B, C]) Batch(rel ...RelationIndex) Batch {
×
262
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
×
263
        return Batch{
×
264
                mask:      q.mask,
×
265
                without:   q.without,
×
266
                relations: q.relations,
×
267
        }
×
268
}
×
269

270
// Filter4 is a filter for 4 components.
271
type Filter4[A any, B any, C any, D any] struct {
272
        world     *World
273
        ids       []ID
274
        mask      Mask
275
        without   Mask
276
        relations []relationID
277
}
278

279
// NewFilter4 creates a new [Filter4].
280
//
281
// Use [Filter4.Query] to obtain a [Query4].
282
func NewFilter4[A any, B any, C any, D any](world *World) *Filter4[A, B, C, D] {
5✔
283
        ids := []ID{
5✔
284
                ComponentID[A](world),
5✔
285
                ComponentID[B](world),
5✔
286
                ComponentID[C](world),
5✔
287
                ComponentID[D](world),
5✔
288
        }
5✔
289

5✔
290
        return &Filter4[A, B, C, D]{
5✔
291
                world: world,
5✔
292
                ids:   ids,
5✔
293
                mask:  All(ids...),
5✔
294
        }
5✔
295
}
5✔
296

297
// With specifies additional components to filter for.
298
func (q *Filter4[A, B, C, D]) With(comps ...Comp) *Filter4[A, B, C, D] {
×
299
        for _, c := range comps {
×
300
                id := q.world.componentID(c.tp)
×
301
                q.mask.Set(id, true)
×
302
        }
×
303
        return q
×
304
}
305

306
// With specifies components to exclude.
307
func (q *Filter4[A, B, C, D]) Without(comps ...Comp) *Filter4[A, B, C, D] {
1✔
308
        for _, c := range comps {
2✔
309
                id := q.world.componentID(c.tp)
1✔
310
                q.without.Set(id, true)
1✔
311
        }
1✔
312
        return q
1✔
313
}
314

315
// Exclusive makes the filter exclusive in the sense that the component composition is matched exactly,
316
// and no other components are allowed.
317
func (q *Filter4[A, B, C, D]) Exclusive() *Filter4[A, B, C, D] {
1✔
318
        q.without = q.mask.Not()
1✔
319
        return q
1✔
320
}
1✔
321

322
// Query creates a [Query4] from this filter.
323
// This must be used each time before iterating a query.
324
func (q *Filter4[A, B, C, D]) Query(rel ...RelationIndex) Query4[A, B, C, D] {
5✔
325
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
5✔
326
        return newQuery4[A, B, C, D](q.world, q.mask, q.without, q.ids, q.relations)
5✔
327
}
5✔
328

329
// Batch creates a [Batch] from this filter.
330
func (q *Filter4[A, B, C, D]) Batch(rel ...RelationIndex) Batch {
×
331
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
×
332
        return Batch{
×
333
                mask:      q.mask,
×
334
                without:   q.without,
×
335
                relations: q.relations,
×
336
        }
×
337
}
×
338

339
// Filter5 is a filter for 5 components.
340
type Filter5[A any, B any, C any, D any, E any] struct {
341
        world     *World
342
        ids       []ID
343
        mask      Mask
344
        without   Mask
345
        relations []relationID
346
}
347

348
// NewFilter5 creates a new [Filter5].
349
//
350
// Use [Filter5.Query] to obtain a [Query5].
351
func NewFilter5[A any, B any, C any, D any, E any](world *World) *Filter5[A, B, C, D, E] {
5✔
352
        ids := []ID{
5✔
353
                ComponentID[A](world),
5✔
354
                ComponentID[B](world),
5✔
355
                ComponentID[C](world),
5✔
356
                ComponentID[D](world),
5✔
357
                ComponentID[E](world),
5✔
358
        }
5✔
359

5✔
360
        return &Filter5[A, B, C, D, E]{
5✔
361
                world: world,
5✔
362
                ids:   ids,
5✔
363
                mask:  All(ids...),
5✔
364
        }
5✔
365
}
5✔
366

367
// With specifies additional components to filter for.
368
func (q *Filter5[A, B, C, D, E]) With(comps ...Comp) *Filter5[A, B, C, D, E] {
×
369
        for _, c := range comps {
×
370
                id := q.world.componentID(c.tp)
×
371
                q.mask.Set(id, true)
×
372
        }
×
373
        return q
×
374
}
375

376
// With specifies components to exclude.
377
func (q *Filter5[A, B, C, D, E]) Without(comps ...Comp) *Filter5[A, B, C, D, E] {
1✔
378
        for _, c := range comps {
2✔
379
                id := q.world.componentID(c.tp)
1✔
380
                q.without.Set(id, true)
1✔
381
        }
1✔
382
        return q
1✔
383
}
384

385
// Exclusive makes the filter exclusive in the sense that the component composition is matched exactly,
386
// and no other components are allowed.
387
func (q *Filter5[A, B, C, D, E]) Exclusive() *Filter5[A, B, C, D, E] {
1✔
388
        q.without = q.mask.Not()
1✔
389
        return q
1✔
390
}
1✔
391

392
// Query creates a [Query5] from this filter.
393
// This must be used each time before iterating a query.
394
func (q *Filter5[A, B, C, D, E]) Query(rel ...RelationIndex) Query5[A, B, C, D, E] {
5✔
395
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
5✔
396
        return newQuery5[A, B, C, D, E](q.world, q.mask, q.without, q.ids, q.relations)
5✔
397
}
5✔
398

399
// Batch creates a [Batch] from this filter.
400
func (q *Filter5[A, B, C, D, E]) Batch(rel ...RelationIndex) Batch {
×
401
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
×
402
        return Batch{
×
403
                mask:      q.mask,
×
404
                without:   q.without,
×
405
                relations: q.relations,
×
406
        }
×
407
}
×
408

409
// Filter6 is a filter for 6 components.
410
type Filter6[A any, B any, C any, D any, E any, F any] struct {
411
        world     *World
412
        ids       []ID
413
        mask      Mask
414
        without   Mask
415
        relations []relationID
416
}
417

418
// NewFilter6 creates a new [Filter6].
419
//
420
// Use [Filter6.Query] to obtain a [Query6].
421
func NewFilter6[A any, B any, C any, D any, E any, F any](world *World) *Filter6[A, B, C, D, E, F] {
5✔
422
        ids := []ID{
5✔
423
                ComponentID[A](world),
5✔
424
                ComponentID[B](world),
5✔
425
                ComponentID[C](world),
5✔
426
                ComponentID[D](world),
5✔
427
                ComponentID[E](world),
5✔
428
                ComponentID[F](world),
5✔
429
        }
5✔
430

5✔
431
        return &Filter6[A, B, C, D, E, F]{
5✔
432
                world: world,
5✔
433
                ids:   ids,
5✔
434
                mask:  All(ids...),
5✔
435
        }
5✔
436
}
5✔
437

438
// With specifies additional components to filter for.
439
func (q *Filter6[A, B, C, D, E, F]) With(comps ...Comp) *Filter6[A, B, C, D, E, F] {
×
440
        for _, c := range comps {
×
441
                id := q.world.componentID(c.tp)
×
442
                q.mask.Set(id, true)
×
443
        }
×
444
        return q
×
445
}
446

447
// With specifies components to exclude.
448
func (q *Filter6[A, B, C, D, E, F]) Without(comps ...Comp) *Filter6[A, B, C, D, E, F] {
1✔
449
        for _, c := range comps {
2✔
450
                id := q.world.componentID(c.tp)
1✔
451
                q.without.Set(id, true)
1✔
452
        }
1✔
453
        return q
1✔
454
}
455

456
// Exclusive makes the filter exclusive in the sense that the component composition is matched exactly,
457
// and no other components are allowed.
458
func (q *Filter6[A, B, C, D, E, F]) Exclusive() *Filter6[A, B, C, D, E, F] {
1✔
459
        q.without = q.mask.Not()
1✔
460
        return q
1✔
461
}
1✔
462

463
// Query creates a [Query6] from this filter.
464
// This must be used each time before iterating a query.
465
func (q *Filter6[A, B, C, D, E, F]) Query(rel ...RelationIndex) Query6[A, B, C, D, E, F] {
5✔
466
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
5✔
467
        return newQuery6[A, B, C, D, E, F](q.world, q.mask, q.without, q.ids, q.relations)
5✔
468
}
5✔
469

470
// Batch creates a [Batch] from this filter.
471
func (q *Filter6[A, B, C, D, E, F]) Batch(rel ...RelationIndex) Batch {
×
472
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
×
473
        return Batch{
×
474
                mask:      q.mask,
×
475
                without:   q.without,
×
476
                relations: q.relations,
×
477
        }
×
478
}
×
479

480
// Filter7 is a filter for 7 components.
481
type Filter7[A any, B any, C any, D any, E any, F any, G any] struct {
482
        world     *World
483
        ids       []ID
484
        mask      Mask
485
        without   Mask
486
        relations []relationID
487
}
488

489
// NewFilter7 creates a new [Filter7].
490
//
491
// Use [Filter7.Query] to obtain a [Query7].
492
func NewFilter7[A any, B any, C any, D any, E any, F any, G any](world *World) *Filter7[A, B, C, D, E, F, G] {
5✔
493
        ids := []ID{
5✔
494
                ComponentID[A](world),
5✔
495
                ComponentID[B](world),
5✔
496
                ComponentID[C](world),
5✔
497
                ComponentID[D](world),
5✔
498
                ComponentID[E](world),
5✔
499
                ComponentID[F](world),
5✔
500
                ComponentID[G](world),
5✔
501
        }
5✔
502

5✔
503
        return &Filter7[A, B, C, D, E, F, G]{
5✔
504
                world: world,
5✔
505
                ids:   ids,
5✔
506
                mask:  All(ids...),
5✔
507
        }
5✔
508
}
5✔
509

510
// With specifies additional components to filter for.
511
func (q *Filter7[A, B, C, D, E, F, G]) With(comps ...Comp) *Filter7[A, B, C, D, E, F, G] {
×
512
        for _, c := range comps {
×
513
                id := q.world.componentID(c.tp)
×
514
                q.mask.Set(id, true)
×
515
        }
×
516
        return q
×
517
}
518

519
// With specifies components to exclude.
520
func (q *Filter7[A, B, C, D, E, F, G]) Without(comps ...Comp) *Filter7[A, B, C, D, E, F, G] {
1✔
521
        for _, c := range comps {
2✔
522
                id := q.world.componentID(c.tp)
1✔
523
                q.without.Set(id, true)
1✔
524
        }
1✔
525
        return q
1✔
526
}
527

528
// Exclusive makes the filter exclusive in the sense that the component composition is matched exactly,
529
// and no other components are allowed.
530
func (q *Filter7[A, B, C, D, E, F, G]) Exclusive() *Filter7[A, B, C, D, E, F, G] {
1✔
531
        q.without = q.mask.Not()
1✔
532
        return q
1✔
533
}
1✔
534

535
// Query creates a [Query7] from this filter.
536
// This must be used each time before iterating a query.
537
func (q *Filter7[A, B, C, D, E, F, G]) Query(rel ...RelationIndex) Query7[A, B, C, D, E, F, G] {
5✔
538
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
5✔
539
        return newQuery7[A, B, C, D, E, F, G](q.world, q.mask, q.without, q.ids, q.relations)
5✔
540
}
5✔
541

542
// Batch creates a [Batch] from this filter.
543
func (q *Filter7[A, B, C, D, E, F, G]) Batch(rel ...RelationIndex) Batch {
×
544
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
×
545
        return Batch{
×
546
                mask:      q.mask,
×
547
                without:   q.without,
×
548
                relations: q.relations,
×
549
        }
×
550
}
×
551

552
// Filter8 is a filter for 8 components.
553
type Filter8[A any, B any, C any, D any, E any, F any, G any, H any] struct {
554
        world     *World
555
        ids       []ID
556
        mask      Mask
557
        without   Mask
558
        relations []relationID
559
}
560

561
// NewFilter8 creates a new [Filter8].
562
//
563
// Use [Filter8.Query] to obtain a [Query8].
564
func NewFilter8[A any, B any, C any, D any, E any, F any, G any, H any](world *World) *Filter8[A, B, C, D, E, F, G, H] {
5✔
565
        ids := []ID{
5✔
566
                ComponentID[A](world),
5✔
567
                ComponentID[B](world),
5✔
568
                ComponentID[C](world),
5✔
569
                ComponentID[D](world),
5✔
570
                ComponentID[E](world),
5✔
571
                ComponentID[F](world),
5✔
572
                ComponentID[G](world),
5✔
573
                ComponentID[H](world),
5✔
574
        }
5✔
575

5✔
576
        return &Filter8[A, B, C, D, E, F, G, H]{
5✔
577
                world: world,
5✔
578
                ids:   ids,
5✔
579
                mask:  All(ids...),
5✔
580
        }
5✔
581
}
5✔
582

583
// With specifies additional components to filter for.
584
func (q *Filter8[A, B, C, D, E, F, G, H]) With(comps ...Comp) *Filter8[A, B, C, D, E, F, G, H] {
×
585
        for _, c := range comps {
×
586
                id := q.world.componentID(c.tp)
×
587
                q.mask.Set(id, true)
×
588
        }
×
589
        return q
×
590
}
591

592
// With specifies components to exclude.
593
func (q *Filter8[A, B, C, D, E, F, G, H]) Without(comps ...Comp) *Filter8[A, B, C, D, E, F, G, H] {
1✔
594
        for _, c := range comps {
2✔
595
                id := q.world.componentID(c.tp)
1✔
596
                q.without.Set(id, true)
1✔
597
        }
1✔
598
        return q
1✔
599
}
600

601
// Exclusive makes the filter exclusive in the sense that the component composition is matched exactly,
602
// and no other components are allowed.
603
func (q *Filter8[A, B, C, D, E, F, G, H]) Exclusive() *Filter8[A, B, C, D, E, F, G, H] {
1✔
604
        q.without = q.mask.Not()
1✔
605
        return q
1✔
606
}
1✔
607

608
// Query creates a [Query8] from this filter.
609
// This must be used each time before iterating a query.
610
func (q *Filter8[A, B, C, D, E, F, G, H]) Query(rel ...RelationIndex) Query8[A, B, C, D, E, F, G, H] {
5✔
611
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
5✔
612
        return newQuery8[A, B, C, D, E, F, G, H](q.world, q.mask, q.without, q.ids, q.relations)
5✔
613
}
5✔
614

615
// Batch creates a [Batch] from this filter.
616
func (q *Filter8[A, B, C, D, E, F, G, H]) Batch(rel ...RelationIndex) Batch {
×
617
        q.relations = relations(rel).toRelations(&q.world.storage.registry, q.ids, q.relations)
×
618
        return Batch{
×
619
                mask:      q.mask,
×
620
                without:   q.without,
×
621
                relations: q.relations,
×
622
        }
×
623
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc