Repository: mlange-42/arche
Pull request #298 (2023-05-13 23:40:13)

Simplify names of `XxxQuery` methods to `XxxQ`

coveralls: ## Pull Request Test Coverage Report for [Build 4969419455](https://coveralls.io/builds/59923013)

* **16** of **16**   **(100.0%)**  changed or added relevant lines in **5** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage remained the same at **100.0%**

---



|  Totals | [![Coverage Status](https://coveralls.io/builds/59923013/badge)](https://coveralls.io/builds/59923013) |
| :-- | --: |
| Change from base [Build 4969416160](https://coveralls.io/builds/59923008): |  0.0% |
| Covered Lines: | 3834 |
| Relevant Lines: | 3834 |

---
##### 💛  - [Coveralls](https://coveralls.io)


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 54fce46..a6828b9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@
 * Rework of generic entity creation API, use `MapX.New`, `MapX.NewWith`, `MapX.NewBatch` and `MapX.NewQuery` (#239, #252)
 * Stats object `WorldStats` etc. adapted for new structure of archetypes nested in nodes (#258)
 * Removed generic filter method `FilterX.Filter` (#271)
+* All batch creation method `Batch.NewQuery` renamed to `Batch.NewBatchQ` (#298)
 
 ### Features
 
@@ -24,7 +25,7 @@
 * Re-introduce `World.Batch` for batch-processing of entities (add/remove/exchange) (#264)
 * New method `Builder.Add` for adding components with a target to entities (#264)
 * New method `Batch.SetRelation` for batch-setting entity relations (#265)
-* New methods `Builder.AddQuery`, `Builder.RemoveQuery` etc. to get a query over batch-processed entities (#297)
+* New methods `Builder.AddQ`, `Builder.RemoveQ` etc. to get a query over batch-processed entities (#297)
 * Sends an `EntityEvent` to the world listener on relation target changes (#265)
 
 ### Performance
diff --git a/benchmark/profile/many_targets/main.go b/benchmark/profile/many_targets/main.go
index 40eceed..14d5273 100644
--- a/benchmark/profile/many_targets/main.go
+++ b/benchmark/profile/many_targets/main.go
@@ -36,7 +36,7 @@ func run(rounds, iters, entities int) {
 		perArch := entities / 1000
 
 		builder := ecs.NewBuilder(&world)
-		targetQuery := builder.NewQuery(1000)
+		targetQuery := builder.NewBatchQ(1000)
 		targets := make([]ecs.Entity, 0, 1000)
 		for targetQuery.Next() {
 			targets = append(targets, targetQuery.Entity())
diff --git a/benchmark/profile/relations/main.go b/benchmark/profile/relations/main.go
index addbd47..1db4485 100644
--- a/benchmark/profile/relations/main.go
+++ b/benchmark/profile/relations/main.go
@@ -52,13 +52,13 @@ func run(rounds, iters, numParents, numChildren int) {
 		childMapper := generic.NewMap1[ChildRelation](&world, generic.T[ChildRelation]())
 		targetMapper := generic.NewMap[ChildRelation](&world)
 
-		spawnedPar := parentMapper.NewQuery(numParents)
+		spawnedPar := parentMapper.NewBatchQ(numParents)
 		parents := make([]ecs.Entity, 0, numParents)
 		for spawnedPar.Next() {
 			parents = append(parents, spawnedPar.Entity())
 		}
 
-		spawnedChild := childMapper.NewQuery(numParents * numChildren)
+		spawnedChild := childMapper.NewBatchQ(numParents * numChildren)
 		children := make([]ecs.Entity, 0, numParents*numChildren)
 		for spawnedChild.Next() {
 			children = append(children, spawnedChild.Entity())
diff --git a/benchmark/profile/world/main.go b/benchmark/profile/world/main.go
index b257aff..8371169 100644
--- a/benchmark/profile/world/main.go
+++ b/benchmark/profile/world/main.go
@@ -47,7 +47,7 @@ func run(rounds, iters, entityCount int) {
 
 		entities := make([]ecs.Entity, 0, entityCount)
 
-		query := ecs.NewBuilder(&world, posID, rotID).NewQuery(entityCount)
+		query := ecs.NewBuilder(&world, posID, rotID).NewBatchQ(entityCount)
 
 		for query.Next() {
 			entities = append(entities, query.Entity())
diff --git a/ecs/batch.go b/ecs/batch.go
index d14bc7f..0d4e94a 100644
--- a/ecs/batch.go
+++ b/ecs/batch.go
@@ -13,12 +13,12 @@ type Batch struct {
 //   - when called with components that can't be added because they are already present.
 //   - when called on a locked world. Do not use during [Query] iteration!
 //
-// See also [Batch.AddQuery] and [World.Add].
+// See also [Batch.AddQ] and [World.Add].
 func (b *Batch) Add(filter Filter, comps ...ID) {
 	b.world.exchangeBatch(filter, comps, nil)
 }
 
-// AddQuery adds components to many entities, matching a filter.
+// AddQ adds components to many entities, matching a filter.
 // It returns a query over the affected entities.
 //
 // Panics:
@@ -26,7 +26,7 @@ func (b *Batch) Add(filter Filter, comps ...ID) {
 //   - when called on a locked world. Do not use during [Query] iteration!
 //
 // See also [Batch.Add] and [World.Add].
-func (b *Batch) AddQuery(filter Filter, comps ...ID) Query {
+func (b *Batch) AddQ(filter Filter, comps ...ID) Query {
 	return b.world.exchangeBatchQuery(filter, comps, nil)
 }
 
@@ -36,12 +36,12 @@ func (b *Batch) AddQuery(filter Filter, comps ...ID) Query {
 //   - when called with components that can't be removed because they are not present.
 //   - when called on a locked world. Do not use during [Query] iteration!
 //
-// See also [Batch.RemoveQuery] and [World.Remove].
+// See also [Batch.RemoveQ] and [World.Remove].
 func (b *Batch) Remove(filter Filter, comps ...ID) {
 	b.world.exchangeBatch(filter, nil, comps)
 }
 
-// RemoveQuery removes components from many entities, matching a filter.
+// RemoveQ removes components from many entities, matching a filter.
 // It returns a query over the affected entities.
 //
 // Panics:
@@ -49,7 +49,7 @@ func (b *Batch) Remove(filter Filter, comps ...ID) {
 //   - when called on a locked world. Do not use during [Query] iteration!
 //
 // See also [Batch.Remove] and [World.Remove].
-func (b *Batch) RemoveQuery(filter Filter, comps ...ID) Query {
+func (b *Batch) RemoveQ(filter Filter, comps ...ID) Query {
 	return b.world.exchangeBatchQuery(filter, nil, comps)
 }
 
@@ -65,7 +65,7 @@ func (b *Batch) SetRelation(filter Filter, comp ID, target Entity) {
 	b.world.setRelationBatch(filter, comp, target)
 }
 
-// SetRelationQuery sets the [Relation] target for many entities, matching a filter.
+// SetRelationQ sets the [Relation] target for many entities, matching a filter.
 // It returns a query over the affected entities.
 //
 // Panics:
@@ -74,7 +74,7 @@ func (b *Batch) SetRelation(filter Filter, comp ID, target Entity) {
 //   - when called on a locked world. Do not use during [Query] iteration!
 //
 // See also [Relations.Set] and [Relations.SetBatch].
-func (b *Batch) SetRelationQuery(filter Filter, comp ID, target Entity) Query {
+func (b *Batch) SetRelationQ(filter Filter, comp ID, target Entity) Query {
 	return b.world.setRelationBatchQuery(filter, comp, target)
 }
 
@@ -84,12 +84,12 @@ func (b *Batch) SetRelationQuery(filter Filter, comp ID, target Entity) Query {
 //   - when called with components that can't be added or removed because they are already present/not present, respectively.
 //   - when called on a locked world. Do not use during [Query] iteration!
 //
-// See also [Batch.ExchangeQuery] and [World.Exchange].
+// See also [Batch.ExchangeQ] and [World.Exchange].
 func (b *Batch) Exchange(filter Filter, add []ID, rem []ID) {
 	b.world.exchangeBatch(filter, add, rem)
 }
 
-// ExchangeQuery exchanges components for many entities, matching a filter.
+// ExchangeQ exchanges components for many entities, matching a filter.
 // It returns a query over the affected entities.
 //
 // Panics:
@@ -97,7 +97,7 @@ func (b *Batch) Exchange(filter Filter, add []ID, rem []ID) {
 //   - when called on a locked world. Do not use during [Query] iteration!
 //
 // See also [Batch.Exchange] and [World.Exchange].
-func (b *Batch) ExchangeQuery(filter Filter, add []ID, rem []ID) Query {
+func (b *Batch) ExchangeQ(filter Filter, add []ID, rem []ID) Query {
 	return b.world.exchangeBatchQuery(filter, add, rem)
 }
 
diff --git a/ecs/builder.go b/ecs/builder.go
index 8cd4ab4..833949a 100644
--- a/ecs/builder.go
+++ b/ecs/builder.go
@@ -29,7 +29,7 @@ func NewBuilderWith(w *World, comps ...Component) *Builder {
 
 // WithRelation sets the [Relation] component for the builder.
 //
-// Use in conjunction with the optional target argument of [Builder.New], [Builder.NewBatch] and [Builder.NewQuery].
+// Use in conjunction with the optional target argument of [Builder.New], [Builder.NewBatch] and [Builder.NewBatchQ].
 //
 // See [Relation] for details and examples.
 func (b *Builder) WithRelation(comp ID) *Builder {
@@ -81,11 +81,11 @@ func (b *Builder) NewBatch(count int, target ...Entity) {
 	}
 }
 
-// NewQuery creates many entities and returns a query over them.
+// NewBatchQ creates many entities and returns a query over them.
 //
 // The optional argument can be used to set the target [Entity] for the Builder's [Relation].
 // See [Builder.WithRelation].
-func (b *Builder) NewQuery(count int, target ...Entity) Query {
+func (b *Builder) NewBatchQ(count int, target ...Entity) Query {
 	if len(target) > 0 {
 		if !b.hasTarget {
 			panic("can't set target entity: builder has no relation")
diff --git a/ecs/doc.go b/ecs/doc.go
index 675f891..055c696 100644
--- a/ecs/doc.go
+++ b/ecs/doc.go
@@ -9,7 +9,7 @@
 //   - [Relations] provide access to and manipulation of entity relations,
 //     like [Relations.Get] and [Relations.Set].
 //   - [Builder] provides advanced entity creation and batched creation with
-//     [Builder.NewBatch] and [Builder.NewQuery].
+//     [Builder.NewBatch] and [Builder.NewBatchQ].
 //   - [Batch] provides batch-manipulation of entities,
 //     like [Batch.Add], [Batch.Remove] and [Batch.SetRelation].
 //   - [Cache] serves for registering and un-registering cached filters
diff --git a/ecs/relations.go b/ecs/relations.go
index bcc4e5e..f80c0e1 100644
--- a/ecs/relations.go
+++ b/ecs/relations.go
@@ -48,12 +48,12 @@ func (r *Relations) Set(entity Entity, comp ID, target Entity) {
 //   - when called for a component that is not a relation.
 //   - when called on a locked world. Do not use during [Query] iteration!
 //
-// See also [Relations.Set], [Relations.SetBatchQuery] and [Batch.SetRelation].
+// See also [Relations.Set], [Relations.SetBatchQ] and [Batch.SetRelation].
 func (r *Relations) SetBatch(filter Filter, comp ID, target Entity) {
 	r.world.setRelationBatch(filter, comp, target)
 }
 
-// SetBatchQuery sets the [Relation] target for many entities, matching a filter.
+// SetBatchQ sets the [Relation] target for many entities, matching a filter.
 // Returns a query over all affected entities.
 //
 // Panics:
@@ -62,6 +62,6 @@ func (r *Relations) SetBatch(filter Filter, comp ID, target Entity) {
 //   - when called on a locked world. Do not use during [Query] iteration!
 //
 // See also [Relations.Set], [Relations.SetBatch] and [Batch.SetRelation].
-func (r *Relations) SetBatchQuery(filter Filter, comp ID, target Entity) Query {
+func (r *Relations) SetBatchQ(filter Filter, comp ID, target Entity) Query {
 	return r.world.setRelationBatchQuery(filter, comp, target)
 }
diff --git a/examples/batch_ops/main.go b/examples/batch_ops/main.go
index 8b267eb..c08e1b2 100644
--- a/examples/batch_ops/main.go
+++ b/examples/batch_ops/main.go
@@ -43,7 +43,7 @@ func run() {
 	builder.NewBatch(100)
 
 	// Batch-create entities, and iterate them.
-	query := builder.NewQuery(100)
+	query := builder.NewBatchQ(100)
 	for query.Next() {
 		pos := (*Position)(query.Get(posID))
 		pos.X = 1.0
@@ -76,7 +76,7 @@ func runGeneric() {
 	mapper.NewBatch(100)
 
 	// Batch-create entities using the mapper, and iterate them.
-	query := mapper.NewQuery(100)
+	query := mapper.NewBatchQ(100)
 	for query.Next() {
 		pos, _ := query.Get()
 		pos.X = 1.0
diff --git a/examples/parallel/main.go b/examples/parallel/main.go
index ac2f254..8cc3962 100644
--- a/examples/parallel/main.go
+++ b/examples/parallel/main.go
@@ -86,7 +86,7 @@ func runModel(w *ecs.World) {
 
 	// Create 10k entities, each with a countdown.
 	mapper := generic.NewMap1[Countdown](w)
-	query := mapper.NewQuery(1000)
+	query := mapper.NewBatchQ(1000)
 
 	// Initialize the just created entities.
 	cnt := 0
diff --git a/generic/generate/map.go.txt b/generic/generate/map.go.txt
index 57a14ba..d7858fd 100644
--- a/generic/generate/map.go.txt
+++ b/generic/generate/map.go.txt
@@ -67,20 +67,20 @@ func (m *Map{{ .Index }}{{ .Types }}) New(target ...ecs.Entity) ecs.Entity {
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map{{ .Index }}'s [ecs.Relation].
 //
-// See also [Map{{ .Index }}.NewQuery] and [ecs.Batch.NewBatch].
+// See also [Map{{ .Index }}.NewBatchQ] and [ecs.Batch.NewBatch].
 func (m *Map{{ .Index }}{{ .Types }}) NewBatch(count int, target ...ecs.Entity) {
 	newBatch(m.world, count, m.ids, m.relation, target...)
 }
 
-// NewQuery creates entities with the Map{{ .Index }}'s components.
+// NewBatchQ creates entities with the Map{{ .Index }}'s components.
 // It returns a [Query{{ .Index }}] over the new entities.
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map{{ .Index }}'s [ecs.Relation].
 //
 // Listener notification is delayed until the query is closed of fully iterated.
 //
-// See also [Map{{ .Index }}.NewBatch] and [ecs.Builder.NewQuery].
-func (m *Map{{ .Index }}{{ .Types }}) NewQuery(count int, target ...ecs.Entity) Query{{ .Index }}{{ .Types }} {
+// See also [Map{{ .Index }}.NewBatch] and [ecs.Builder.NewBatchQ].
+func (m *Map{{ .Index }}{{ .Types }}) NewBatchQ(count int, target ...ecs.Entity) Query{{ .Index }}{{ .Types }} {
 	query := newQuery(m.world, count, m.ids, m.relation, target...)
 	return Query{{ .Index }}{{ .Types }}{
 		Query: query,
diff --git a/generic/map_generated.go b/generic/map_generated.go
index eee8ca7..7e583fb 100644
--- a/generic/map_generated.go
+++ b/generic/map_generated.go
@@ -74,20 +74,20 @@ func (m *Map1[A]) New(target ...ecs.Entity) ecs.Entity {
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map1's [ecs.Relation].
 //
-// See also [Map1.NewQuery] and [ecs.Batch.NewBatch].
+// See also [Map1.NewBatchQ] and [ecs.Batch.NewBatch].
 func (m *Map1[A]) NewBatch(count int, target ...ecs.Entity) {
 	newBatch(m.world, count, m.ids, m.relation, target...)
 }
 
-// NewQuery creates entities with the Map1's components.
+// NewBatchQ creates entities with the Map1's components.
 // It returns a [Query1] over the new entities.
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map1's [ecs.Relation].
 //
 // Listener notification is delayed until the query is closed of fully iterated.
 //
-// See also [Map1.NewBatch] and [ecs.Builder.NewQuery].
-func (m *Map1[A]) NewQuery(count int, target ...ecs.Entity) Query1[A] {
+// See also [Map1.NewBatch] and [ecs.Builder.NewBatchQ].
+func (m *Map1[A]) NewBatchQ(count int, target ...ecs.Entity) Query1[A] {
 	query := newQuery(m.world, count, m.ids, m.relation, target...)
 	return Query1[A]{
 		Query: query,
@@ -221,20 +221,20 @@ func (m *Map2[A, B]) New(target ...ecs.Entity) ecs.Entity {
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map2's [ecs.Relation].
 //
-// See also [Map2.NewQuery] and [ecs.Batch.NewBatch].
+// See also [Map2.NewBatchQ] and [ecs.Batch.NewBatch].
 func (m *Map2[A, B]) NewBatch(count int, target ...ecs.Entity) {
 	newBatch(m.world, count, m.ids, m.relation, target...)
 }
 
-// NewQuery creates entities with the Map2's components.
+// NewBatchQ creates entities with the Map2's components.
 // It returns a [Query2] over the new entities.
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map2's [ecs.Relation].
 //
 // Listener notification is delayed until the query is closed of fully iterated.
 //
-// See also [Map2.NewBatch] and [ecs.Builder.NewQuery].
-func (m *Map2[A, B]) NewQuery(count int, target ...ecs.Entity) Query2[A, B] {
+// See also [Map2.NewBatch] and [ecs.Builder.NewBatchQ].
+func (m *Map2[A, B]) NewBatchQ(count int, target ...ecs.Entity) Query2[A, B] {
 	query := newQuery(m.world, count, m.ids, m.relation, target...)
 	return Query2[A, B]{
 		Query: query,
@@ -378,20 +378,20 @@ func (m *Map3[A, B, C]) New(target ...ecs.Entity) ecs.Entity {
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map3's [ecs.Relation].
 //
-// See also [Map3.NewQuery] and [ecs.Batch.NewBatch].
+// See also [Map3.NewBatchQ] and [ecs.Batch.NewBatch].
 func (m *Map3[A, B, C]) NewBatch(count int, target ...ecs.Entity) {
 	newBatch(m.world, count, m.ids, m.relation, target...)
 }
 
-// NewQuery creates entities with the Map3's components.
+// NewBatchQ creates entities with the Map3's components.
 // It returns a [Query3] over the new entities.
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map3's [ecs.Relation].
 //
 // Listener notification is delayed until the query is closed of fully iterated.
 //
-// See also [Map3.NewBatch] and [ecs.Builder.NewQuery].
-func (m *Map3[A, B, C]) NewQuery(count int, target ...ecs.Entity) Query3[A, B, C] {
+// See also [Map3.NewBatch] and [ecs.Builder.NewBatchQ].
+func (m *Map3[A, B, C]) NewBatchQ(count int, target ...ecs.Entity) Query3[A, B, C] {
 	query := newQuery(m.world, count, m.ids, m.relation, target...)
 	return Query3[A, B, C]{
 		Query: query,
@@ -543,20 +543,20 @@ func (m *Map4[A, B, C, D]) New(target ...ecs.Entity) ecs.Entity {
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map4's [ecs.Relation].
 //
-// See also [Map4.NewQuery] and [ecs.Batch.NewBatch].
+// See also [Map4.NewBatchQ] and [ecs.Batch.NewBatch].
 func (m *Map4[A, B, C, D]) NewBatch(count int, target ...ecs.Entity) {
 	newBatch(m.world, count, m.ids, m.relation, target...)
 }
 
-// NewQuery creates entities with the Map4's components.
+// NewBatchQ creates entities with the Map4's components.
 // It returns a [Query4] over the new entities.
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map4's [ecs.Relation].
 //
 // Listener notification is delayed until the query is closed of fully iterated.
 //
-// See also [Map4.NewBatch] and [ecs.Builder.NewQuery].
-func (m *Map4[A, B, C, D]) NewQuery(count int, target ...ecs.Entity) Query4[A, B, C, D] {
+// See also [Map4.NewBatch] and [ecs.Builder.NewBatchQ].
+func (m *Map4[A, B, C, D]) NewBatchQ(count int, target ...ecs.Entity) Query4[A, B, C, D] {
 	query := newQuery(m.world, count, m.ids, m.relation, target...)
 	return Query4[A, B, C, D]{
 		Query: query,
@@ -716,20 +716,20 @@ func (m *Map5[A, B, C, D, E]) New(target ...ecs.Entity) ecs.Entity {
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map5's [ecs.Relation].
 //
-// See also [Map5.NewQuery] and [ecs.Batch.NewBatch].
+// See also [Map5.NewBatchQ] and [ecs.Batch.NewBatch].
 func (m *Map5[A, B, C, D, E]) NewBatch(count int, target ...ecs.Entity) {
 	newBatch(m.world, count, m.ids, m.relation, target...)
 }
 
-// NewQuery creates entities with the Map5's components.
+// NewBatchQ creates entities with the Map5's components.
 // It returns a [Query5] over the new entities.
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map5's [ecs.Relation].
 //
 // Listener notification is delayed until the query is closed of fully iterated.
 //
-// See also [Map5.NewBatch] and [ecs.Builder.NewQuery].
-func (m *Map5[A, B, C, D, E]) NewQuery(count int, target ...ecs.Entity) Query5[A, B, C, D, E] {
+// See also [Map5.NewBatch] and [ecs.Builder.NewBatchQ].
+func (m *Map5[A, B, C, D, E]) NewBatchQ(count int, target ...ecs.Entity) Query5[A, B, C, D, E] {
 	query := newQuery(m.world, count, m.ids, m.relation, target...)
 	return Query5[A, B, C, D, E]{
 		Query: query,
@@ -897,20 +897,20 @@ func (m *Map6[A, B, C, D, E, F]) New(target ...ecs.Entity) ecs.Entity {
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map6's [ecs.Relation].
 //
-// See also [Map6.NewQuery] and [ecs.Batch.NewBatch].
+// See also [Map6.NewBatchQ] and [ecs.Batch.NewBatch].
 func (m *Map6[A, B, C, D, E, F]) NewBatch(count int, target ...ecs.Entity) {
 	newBatch(m.world, count, m.ids, m.relation, target...)
 }
 
-// NewQuery creates entities with the Map6's components.
+// NewBatchQ creates entities with the Map6's components.
 // It returns a [Query6] over the new entities.
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map6's [ecs.Relation].
 //
 // Listener notification is delayed until the query is closed of fully iterated.
 //
-// See also [Map6.NewBatch] and [ecs.Builder.NewQuery].
-func (m *Map6[A, B, C, D, E, F]) NewQuery(count int, target ...ecs.Entity) Query6[A, B, C, D, E, F] {
+// See also [Map6.NewBatch] and [ecs.Builder.NewBatchQ].
+func (m *Map6[A, B, C, D, E, F]) NewBatchQ(count int, target ...ecs.Entity) Query6[A, B, C, D, E, F] {
 	query := newQuery(m.world, count, m.ids, m.relation, target...)
 	return Query6[A, B, C, D, E, F]{
 		Query: query,
@@ -1086,20 +1086,20 @@ func (m *Map7[A, B, C, D, E, F, G]) New(target ...ecs.Entity) ecs.Entity {
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map7's [ecs.Relation].
 //
-// See also [Map7.NewQuery] and [ecs.Batch.NewBatch].
+// See also [Map7.NewBatchQ] and [ecs.Batch.NewBatch].
 func (m *Map7[A, B, C, D, E, F, G]) NewBatch(count int, target ...ecs.Entity) {
 	newBatch(m.world, count, m.ids, m.relation, target...)
 }
 
-// NewQuery creates entities with the Map7's components.
+// NewBatchQ creates entities with the Map7's components.
 // It returns a [Query7] over the new entities.
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map7's [ecs.Relation].
 //
 // Listener notification is delayed until the query is closed of fully iterated.
 //
-// See also [Map7.NewBatch] and [ecs.Builder.NewQuery].
-func (m *Map7[A, B, C, D, E, F, G]) NewQuery(count int, target ...ecs.Entity) Query7[A, B, C, D, E, F, G] {
+// See also [Map7.NewBatch] and [ecs.Builder.NewBatchQ].
+func (m *Map7[A, B, C, D, E, F, G]) NewBatchQ(count int, target ...ecs.Entity) Query7[A, B, C, D, E, F, G] {
 	query := newQuery(m.world, count, m.ids, m.relation, target...)
 	return Query7[A, B, C, D, E, F, G]{
 		Query: query,
@@ -1283,20 +1283,20 @@ func (m *Map8[A, B, C, D, E, F, G, H]) New(target ...ecs.Entity) ecs.Entity {
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map8's [ecs.Relation].
 //
-// See also [Map8.NewQuery] and [ecs.Batch.NewBatch].
+// See also [Map8.NewBatchQ] and [ecs.Batch.NewBatch].
 func (m *Map8[A, B, C, D, E, F, G, H]) NewBatch(count int, target ...ecs.Entity) {
 	newBatch(m.world, count, m.ids, m.relation, target...)
 }
 
-// NewQuery creates entities with the Map8's components.
+// NewBatchQ creates entities with the Map8's components.
 // It returns a [Query8] over the new entities.
 //
 // The optional argument can be used to set the target [ecs.Entity] for the Map8's [ecs.Relation].
 //
 // Listener notification is delayed until the query is closed of fully iterated.
 //
-// See also [Map8.NewBatch] and [ecs.Builder.NewQuery].
-func (m *Map8[A, B, C, D, E, F, G, H]) NewQuery(count int, target ...ecs.Entity) Query8[A, B, C, D, E, F, G, H] {
+// See also [Map8.NewBatch] and [ecs.Builder.NewBatchQ].
+func (m *Map8[A, B, C, D, E, F, G, H]) NewBatchQ(count int, target ...ecs.Entity) Query8[A, B, C, D, E, F, G, H] {
 	query := newQuery(m.world, count, m.ids, m.relation, target...)
 	return Query8[A, B, C, D, E, F, G, H]{
 		Query: query,
diff --git a/generic/util.go b/generic/util.go
index 459025b..0285fb3 100644
--- a/generic/util.go
+++ b/generic/util.go
@@ -81,12 +81,12 @@ func newQuery(w *ecs.World, count int, ids []ecs.ID, relation int8, target ...ec
 	var query ecs.Query
 
 	if len(target) == 0 {
-		query = ecs.NewBuilder(w, ids...).NewQuery(count)
+		query = ecs.NewBuilder(w, ids...).NewBatchQ(count)
 	} else {
 		if relation < 0 {
 			panic("map has no relation defined")
 		}
-		query = ecs.NewBuilder(w, ids...).WithRelation(uint8(relation)).NewQuery(count, target[0])
+		query = ecs.NewBuilder(w, ids...).WithRelation(uint8(relation)).NewBatchQ(count, target[0])
 	}
 
 	return query


Test patch:
diff --git a/benchmark/arche/add/arche_test.go b/benchmark/arche/add/arche_test.go
index 59af2d0..9e01b07 100644
--- a/benchmark/arche/add/arche_test.go
+++ b/benchmark/arche/add/arche_test.go
@@ -72,7 +72,7 @@ func addSetArcheBatch(b *testing.B, count int) {
 		comps := []ecs.ID{posID, rotID}
 		b.StartTimer()
 
-		query := ecs.NewBuilder(&world, comps...).NewQuery(count)
+		query := ecs.NewBuilder(&world, comps...).NewBatchQ(count)
 		for query.Next() {
 			pos := (*c.Position)(query.Get(posID))
 			rot := (*c.Rotation)(query.Get(rotID))
@@ -133,7 +133,7 @@ func addSetArcheGenericBatch(b *testing.B, count int) {
 		mut := generic.NewMap2[c.Position, c.Rotation](&world)
 		b.StartTimer()
 
-		query := mut.NewQuery(count)
+		query := mut.NewBatchQ(count)
 
 		for query.Next() {
 			pos, rot := query.Get()
diff --git a/benchmark/arche/fragmentation/arche_test.go b/benchmark/arche/fragmentation/arche_test.go
index a6d6730..4e4ab40 100644
--- a/benchmark/arche/fragmentation/arche_test.go
+++ b/benchmark/arche/fragmentation/arche_test.go
@@ -196,7 +196,7 @@ func runQuery1kTargets(b *testing.B, count int) {
 	perArch := count / 1000
 
 	builder := ecs.NewBuilder(&world)
-	targetQuery := builder.NewQuery(1000)
+	targetQuery := builder.NewBatchQ(1000)
 	targets := make([]ecs.Entity, 0, 1000)
 	for targetQuery.Next() {
 		targets = append(targets, targetQuery.Entity())
@@ -228,7 +228,7 @@ func runQuery1kTargetsCached(b *testing.B, count int) {
 	perArch := count / 1000
 
 	builder := ecs.NewBuilder(&world)
-	targetQuery := builder.NewQuery(1000)
+	targetQuery := builder.NewBatchQ(1000)
 	targets := make([]ecs.Entity, 0, 1000)
 	for targetQuery.Next() {
 		targets = append(targets, targetQuery.Entity())
@@ -259,7 +259,7 @@ func runQuery1Of1kTargets(b *testing.B, count int) {
 	relID := ecs.ComponentID[c.ChildOf](&world)
 
 	builder := ecs.NewBuilder(&world)
-	targetQuery := builder.NewQuery(1000)
+	targetQuery := builder.NewBatchQ(1000)
 	targets := make([]ecs.Entity, 0, 1000)
 	for targetQuery.Next() {
 		targets = append(targets, targetQuery.Entity())
@@ -291,7 +291,7 @@ func runQuery1Of1kTargetsCached(b *testing.B, count int) {
 	relID := ecs.ComponentID[c.ChildOf](&world)
 
 	builder := ecs.NewBuilder(&world)
-	targetQuery := builder.NewQuery(1000)
+	targetQuery := builder.NewBatchQ(1000)
 	targets := make([]ecs.Entity, 0, 1000)
 	for targetQuery.Next() {
 		targets = append(targets, targetQuery.Entity())
diff --git a/benchmark/arche/move/arche_test.go b/benchmark/arche/move/arche_test.go
index 68252ab..e613359 100644
--- a/benchmark/arche/move/arche_test.go
+++ b/benchmark/arche/move/arche_test.go
@@ -27,7 +27,7 @@ func runArcheMove(b *testing.B, count int, add, rem []g.Comp) {
 
 		entities := make([]ecs.Entity, count)
 
-		query := ecs.NewBuilder(&world, addIDs...).NewQuery(count)
+		query := ecs.NewBuilder(&world, addIDs...).NewBatchQ(count)
 
 		cnt := 0
 		for query.Next() {
diff --git a/benchmark/competition/relations/child_test.go b/benchmark/competition/relations/child_test.go
index 3213e8b..3774db9 100644
--- a/benchmark/competition/relations/child_test.go
+++ b/benchmark/competition/relations/child_test.go
@@ -18,13 +18,13 @@ func benchmarkChild(b *testing.B, numParents int, numChildren int) {
 	parentMapper := generic.NewMap1[ParentList](&world)
 	childMapper := generic.NewMap1[Child](&world)
 
-	spawnedPar := parentMapper.NewQuery(numParents)
+	spawnedPar := parentMapper.NewBatchQ(numParents)
 	parents := make([]ecs.Entity, 0, numParents)
 	for spawnedPar.Next() {
 		parents = append(parents, spawnedPar.Entity())
 	}
 
-	spawnedChild := childMapper.NewQuery(numParents * numChildren)
+	spawnedChild := childMapper.NewBatchQ(numParents * numChildren)
 	children := make([]ecs.Entity, 0, numParents*numChildren)
 	for spawnedChild.Next() {
 		children = append(children, spawnedChild.Entity())
diff --git a/benchmark/competition/relations/parent_list_test.go b/benchmark/competition/relations/parent_list_test.go
index 720e1ce..0e0a1c9 100644
--- a/benchmark/competition/relations/parent_list_test.go
+++ b/benchmark/competition/relations/parent_list_test.go
@@ -18,13 +18,13 @@ func benchmarkParentList(b *testing.B, numParents int, numChildren int) {
 	parentMapper := generic.NewMap1[ParentList](&world)
 	childMapper := generic.NewMap1[ChildList](&world)
 
-	spawnedPar := parentMapper.NewQuery(numParents)
+	spawnedPar := parentMapper.NewBatchQ(numParents)
 	parents := make([]ecs.Entity, 0, numParents)
 	for spawnedPar.Next() {
 		parents = append(parents, spawnedPar.Entity())
 	}
 
-	spawnedChild := childMapper.NewQuery(numParents * numChildren)
+	spawnedChild := childMapper.NewBatchQ(numParents * numChildren)
 	children := make([]ecs.Entity, 0, numParents*numChildren)
 	for spawnedChild.Next() {
 		children = append(children, spawnedChild.Entity())
diff --git a/benchmark/competition/relations/parent_slice_test.go b/benchmark/competition/relations/parent_slice_test.go
index 3483e18..d0a8cdc 100644
--- a/benchmark/competition/relations/parent_slice_test.go
+++ b/benchmark/competition/relations/parent_slice_test.go
@@ -18,13 +18,13 @@ func benchmarkParentSlice(b *testing.B, numParents int, numChildren int) {
 	parentMapper := generic.NewMap1[ParentSlice](&world)
 	childMapper := generic.NewMap1[Child](&world)
 
-	spawnedPar := parentMapper.NewQuery(numParents)
+	spawnedPar := parentMapper.NewBatchQ(numParents)
 	parents := make([]ecs.Entity, 0, numParents)
 	for spawnedPar.Next() {
 		parents = append(parents, spawnedPar.Entity())
 	}
 
-	spawnedChild := childMapper.NewQuery(numParents * numChildren)
+	spawnedChild := childMapper.NewBatchQ(numParents * numChildren)
 	children := make([]ecs.Entity, 0, numParents*numChildren)
 	for spawnedChild.Next() {
 		children = append(children, spawnedChild.Entity())
diff --git a/benchmark/competition/relations/relation_cached_test.go b/benchmark/competition/relations/relation_cached_test.go
index 0ac9151..a5f99d4 100644
--- a/benchmark/competition/relations/relation_cached_test.go
+++ b/benchmark/competition/relations/relation_cached_test.go
@@ -25,7 +25,7 @@ func benchmarkRelationCached(b *testing.B, numParents int, numChildren int) {
 	childMapper := generic.NewMap1[ChildRelation](&world, generic.T[ChildRelation]())
 	targetMapper := generic.NewMap[ChildRelation](&world)
 
-	spawnedPar := parentMapper.NewQuery(numParents)
+	spawnedPar := parentMapper.NewBatchQ(numParents)
 	parents := make([]ecs.Entity, 0, numParents)
 	for spawnedPar.Next() {
 		par := spawnedPar.Entity()
@@ -36,7 +36,7 @@ func benchmarkRelationCached(b *testing.B, numParents int, numChildren int) {
 		parents = append(parents, par)
 	}
 
-	spawnedChild := childMapper.NewQuery(numParents * numChildren)
+	spawnedChild := childMapper.NewBatchQ(numParents * numChildren)
 	children := make([]ecs.Entity, 0, numParents*numChildren)
 	for spawnedChild.Next() {
 		children = append(children, spawnedChild.Entity())
diff --git a/benchmark/competition/relations/relation_test.go b/benchmark/competition/relations/relation_test.go
index 451ae15..ca6ba9f 100644
--- a/benchmark/competition/relations/relation_test.go
+++ b/benchmark/competition/relations/relation_test.go
@@ -19,13 +19,13 @@ func benchmarkRelation(b *testing.B, numParents int, numChildren int) {
 	childMapper := generic.NewMap1[ChildRelation](&world, generic.T[ChildRelation]())
 	targetMapper := generic.NewMap[ChildRelation](&world)
 
-	spawnedPar := parentMapper.NewQuery(numParents)
+	spawnedPar := parentMapper.NewBatchQ(numParents)
 	parents := make([]ecs.Entity, 0, numParents)
 	for spawnedPar.Next() {
 		parents = append(parents, spawnedPar.Entity())
 	}
 
-	spawnedChild := childMapper.NewQuery(numParents * numChildren)
+	spawnedChild := childMapper.NewBatchQ(numParents * numChildren)
 	children := make([]ecs.Entity, 0, numParents*numChildren)
 	for spawnedChild.Next() {
 		children = append(children, spawnedChild.Entity())
diff --git a/ecs/builder_test.go b/ecs/builder_test.go
index 98ecf32..32fdd5f 100644
--- a/ecs/builder_test.go
+++ b/ecs/builder_test.go
@@ -27,11 +27,11 @@ func TestBuilder(t *testing.T) {
 
 	assert.Panics(t, func() { b1.New(target) })
 	assert.Panics(t, func() { b1.NewBatch(10, target) })
-	assert.Panics(t, func() { b1.NewQuery(10, target) })
+	assert.Panics(t, func() { b1.NewBatchQ(10, target) })
 	assert.Panics(t, func() { b1.Add(e1, target) })
 
 	b1.NewBatch(10)
-	q := b1.NewQuery(10)
+	q := b1.NewBatchQ(10)
 	assert.Equal(t, 10, q.Count())
 	q.Close()
 
@@ -46,11 +46,11 @@ func TestBuilder(t *testing.T) {
 
 	assert.Panics(t, func() { b1.New(target) })
 	assert.Panics(t, func() { b1.NewBatch(10, target) })
-	assert.Panics(t, func() { b1.NewQuery(10, target) })
+	assert.Panics(t, func() { b1.NewBatchQ(10, target) })
 	assert.Panics(t, func() { b1.Add(e2, target) })
 
 	b1.NewBatch(10)
-	q = b1.NewQuery(10)
+	q = b1.NewBatchQ(10)
 	assert.Equal(t, 10, q.Count())
 	q.Close()
 
@@ -65,7 +65,7 @@ func TestBuilder(t *testing.T) {
 	assert.Equal(t, target, w.Relations().Get(e2, relID))
 
 	b1.NewBatch(10, target)
-	q = b1.NewQuery(10, target)
+	q = b1.NewBatchQ(10, target)
 	assert.Equal(t, 10, q.Count())
 	for q.Next() {
 		assert.Equal(t, target, q.Relation(relID))
@@ -85,7 +85,7 @@ func TestBuilder(t *testing.T) {
 	assert.Equal(t, target, w.Relations().Get(e2, relID))
 
 	b1.NewBatch(10, target)
-	q = b1.NewQuery(10, target)
+	q = b1.NewBatchQ(10, target)
 	assert.Equal(t, 10, q.Count())
 	for q.Next() {
 		assert.Equal(t, target, q.Relation(relID))
@@ -152,14 +152,14 @@ func ExampleBuilder_NewBatch() {
 	// Output:
 }
 
-func ExampleBuilder_NewQuery() {
+func ExampleBuilder_NewBatchQ() {
 	world := ecs.NewWorld()
 	posID := ecs.ComponentID[Position](&world)
 	velID := ecs.ComponentID[Velocity](&world)
 
 	builder := ecs.NewBuilder(&world, posID, velID)
 
-	query := builder.NewQuery(1000)
+	query := builder.NewBatchQ(1000)
 
 	for query.Next() {
 		// initialize components of the newly created entities
diff --git a/ecs/query_test.go b/ecs/query_test.go
index c3d723f..707516e 100644
--- a/ecs/query_test.go
+++ b/ecs/query_test.go
@@ -253,7 +253,7 @@ func TestQueryCount(t *testing.T) {
 	assert.Equal(t, 4, q.Count())
 	q.Close()
 
-	q = NewBuilder(&w, posID, rotID).NewQuery(25)
+	q = NewBuilder(&w, posID, rotID).NewBatchQ(25)
 	assert.Equal(t, 25, q.Count())
 	q.Close()
 }
diff --git a/ecs/relation_benchmark_test.go b/ecs/relation_benchmark_test.go
index e1b9e56..f85135c 100644
--- a/ecs/relation_benchmark_test.go
+++ b/ecs/relation_benchmark_test.go
@@ -63,7 +63,7 @@ func benchmarkRelationGetWorld(b *testing.B, count int) {
 	target := world.NewEntity()
 
 	builder := NewBuilder(&world, relID).WithRelation(relID)
-	q := builder.NewQuery(count, target)
+	q := builder.NewBatchQ(count, target)
 	entities := make([]Entity, 0, count)
 	for q.Next() {
 		entities = append(entities, q.Entity())
@@ -89,7 +89,7 @@ func benchmarkRelationGetWorldUnchecked(b *testing.B, count int) {
 	target := world.NewEntity()
 
 	builder := NewBuilder(&world, relID).WithRelation(relID)
-	q := builder.NewQuery(count, target)
+	q := builder.NewBatchQ(count, target)
 	entities := make([]Entity, 0, count)
 	for q.Next() {
 		entities = append(entities, q.Entity())
@@ -115,7 +115,7 @@ func benchmarkRelationSet(b *testing.B, count int) {
 	target := world.NewEntity()
 
 	builder := NewBuilder(&world, relID).WithRelation(relID)
-	q := builder.NewQuery(count)
+	q := builder.NewBatchQ(count)
 	entities := make([]Entity, 0, count)
 	for q.Next() {
 		entities = append(entities, q.Entity())
diff --git a/ecs/relation_stress_test.go b/ecs/relation_stress_test.go
index 441a989..c9be4d4 100644
--- a/ecs/relation_stress_test.go
+++ b/ecs/relation_stress_test.go
@@ -27,7 +27,7 @@ func TestRelationStress(t *testing.T) {
 		parBuilder := ecs.NewBuilder(&world, posID)
 		childBuilder := ecs.NewBuilder(&world, relID).WithRelation(relID)
 
-		query := parBuilder.NewQuery(numParents)
+		query := parBuilder.NewBatchQ(numParents)
 		for query.Next() {
 			parents = append(parents, query.Entity())
 		}
diff --git a/ecs/world_test.go b/ecs/world_test.go
index 9c67797..9e8d127 100644
--- a/ecs/world_test.go
+++ b/ecs/world_test.go
@@ -285,7 +285,7 @@ func TestWorldExchangeBatch(t *testing.T) {
 	builder.NewBatch(100, target2)
 
 	filter := All(posID, relID)
-	query := w.Batch().ExchangeQuery(filter, []ID{velID}, []ID{posID})
+	query := w.Batch().ExchangeQ(filter, []ID{velID}, []ID{posID})
 	assert.Equal(t, 200, query.Count())
 	for query.Next() {
 		assert.True(t, query.Has(velID))
@@ -298,7 +298,7 @@ func TestWorldExchangeBatch(t *testing.T) {
 	query.Close()
 
 	filter2 := NewRelationFilter(All(relID), target1)
-	query = w.Batch().ExchangeQuery(&filter2, []ID{posID}, []ID{velID})
+	query = w.Batch().ExchangeQ(&filter2, []ID{posID}, []ID{velID})
 	assert.Equal(t, 100, query.Count())
 	for query.Next() {
 		assert.True(t, query.Has(posID))
@@ -347,12 +347,12 @@ func TestWorldExchangeBatch(t *testing.T) {
 	builder.NewBatch(100, target1)
 
 	filter = All(velID)
-	q = w.Batch().RemoveQuery(filter, velID)
+	q = w.Batch().RemoveQ(filter, velID)
 	assert.Equal(t, 1, q.Count())
 	q.Close()
 
 	filter = All()
-	q = w.Batch().AddQuery(filter, velID)
+	q = w.Batch().AddQ(filter, velID)
 	assert.Equal(t, 101, q.Count())
 	q.Close()
 }
@@ -779,7 +779,7 @@ func TestWorldRelationSetBatch(t *testing.T) {
 	builder.NewBatch(100, targ3)
 
 	relFilter := NewRelationFilter(All(relID), targ2)
-	q := world.Batch().SetRelationQuery(&relFilter, relID, targ1)
+	q := world.Batch().SetRelationQ(&relFilter, relID, targ1)
 	assert.Equal(t, 100, q.Count())
 	cnt := 0
 	for q.Next() {
@@ -788,7 +788,7 @@ func TestWorldRelationSetBatch(t *testing.T) {
 	}
 	assert.Equal(t, 100, cnt)
 
-	q = world.Batch().SetRelationQuery(All(relID), relID, targ3)
+	q = world.Batch().SetRelationQ(All(relID), relID, targ3)
 	assert.Equal(t, 300, q.Count())
 	cnt = 0
 	for q.Next() {
@@ -798,7 +798,7 @@ func TestWorldRelationSetBatch(t *testing.T) {
 	assert.Equal(t, 300, cnt)
 
 	relFilter = NewRelationFilter(All(relID), targ3)
-	q = world.Batch().SetRelationQuery(&relFilter, relID, Entity{})
+	q = world.Batch().SetRelationQ(&relFilter, relID, Entity{})
 	assert.Equal(t, 300, q.Count())
 	cnt = 0
 	for q.Next() {
@@ -819,7 +819,7 @@ func TestWorldRelationSetBatch(t *testing.T) {
 
 	world.Relations().SetBatch(All(relID), relID, targ1)
 
-	q = world.Relations().SetBatchQuery(All(relID), relID, targ2)
+	q = world.Relations().SetBatchQ(All(relID), relID, targ2)
 	assert.Equal(t, 300, q.Count())
 	q.Close()
 
@@ -1098,7 +1098,7 @@ func TestWorldRelationMove(t *testing.T) {
 
 	entities := []Entity{}
 	for _, trg := range [...]Entity{target1, target2} {
-		query := NewBuilder(&world, relID).WithRelation(relID).NewQuery(100, trg)
+		query := NewBuilder(&world, relID).WithRelation(relID).NewBatchQ(100, trg)
 		for query.Next() {
 			entities = append(entities, query.Entity())
 		}
diff --git a/generic/map_generated_test.go b/generic/map_generated_test.go
index 4c906fe..f602618 100644
--- a/generic/map_generated_test.go
+++ b/generic/map_generated_test.go
@@ -43,7 +43,7 @@ func TestMap1Generated(t *testing.T) {
 
 	mut.NewBatch(2)
 
-	q := mut.NewQuery(2)
+	q := mut.NewBatchQ(2)
 	q.Close()
 
 	mut.GetUnchecked(e)
@@ -60,13 +60,13 @@ func TestMap1Generated(t *testing.T) {
 
 	assert.Panics(t, func() { mut.New(target) })
 	assert.Panics(t, func() { mut.NewBatch(5, target) })
-	assert.Panics(t, func() { mut.NewQuery(5, target) })
+	assert.Panics(t, func() { mut.NewBatchQ(5, target) })
 
 	mut2 := NewMap1[testRelationA](&w, T[testRelationA]())
 
 	mut2.New(target)
 	mut2.NewBatch(5, target)
-	q2 := mut2.NewQuery(5, target)
+	q2 := mut2.NewBatchQ(5, target)
 	assert.Equal(t, 5, q2.Count())
 	q2.Close()
 
@@ -119,7 +119,7 @@ func TestMap2Generated(t *testing.T) {
 
 	mut.NewBatch(2)
 
-	q := mut.NewQuery(2)
+	q := mut.NewBatchQ(2)
 	q.Close()
 
 	mut.GetUnchecked(e)
@@ -136,7 +136,7 @@ func TestMap2Generated(t *testing.T) {
 
 	assert.Panics(t, func() { mut.New(target) })
 	assert.Panics(t, func() { mut.NewBatch(5, target) })
-	assert.Panics(t, func() { mut.NewQuery(5, target) })
+	assert.Panics(t, func() { mut.NewBatchQ(5, target) })
 
 	mut2 := NewMap2[
 		testRelationA, testStruct1,
@@ -144,7 +144,7 @@ func TestMap2Generated(t *testing.T) {
 
 	mut2.New(target)
 	mut2.NewBatch(5, target)
-	q2 := mut2.NewQuery(5, target)
+	q2 := mut2.NewBatchQ(5, target)
 	assert.Equal(t, 5, q2.Count())
 	q2.Close()
 
@@ -201,7 +201,7 @@ func TestMap3Generated(t *testing.T) {
 
 	mut.NewBatch(2)
 
-	q := mut.NewQuery(2)
+	q := mut.NewBatchQ(2)
 	q.Close()
 
 	mut.GetUnchecked(e)
@@ -218,7 +218,7 @@ func TestMap3Generated(t *testing.T) {
 
 	assert.Panics(t, func() { mut.New(target) })
 	assert.Panics(t, func() { mut.NewBatch(5, target) })
-	assert.Panics(t, func() { mut.NewQuery(5, target) })
+	assert.Panics(t, func() { mut.NewBatchQ(5, target) })
 
 	mut2 := NewMap3[
 		testRelationA, testStruct1, testStruct2,
@@ -226,7 +226,7 @@ func TestMap3Generated(t *testing.T) {
 
 	mut2.New(target)
 	mut2.NewBatch(5, target)
-	q2 := mut2.NewQuery(5, target)
+	q2 := mut2.NewBatchQ(5, target)
 	assert.Equal(t, 5, q2.Count())
 	q2.Close()
 
@@ -286,7 +286,7 @@ func TestMap4Generated(t *testing.T) {
 
 	mut.NewBatch(2)
 
-	q := mut.NewQuery(2)
+	q := mut.NewBatchQ(2)
 	q.Close()
 
 	mut.GetUnchecked(e)
@@ -303,7 +303,7 @@ func TestMap4Generated(t *testing.T) {
 
 	assert.Panics(t, func() { mut.New(target) })
 	assert.Panics(t, func() { mut.NewBatch(5, target) })
-	assert.Panics(t, func() { mut.NewQuery(5, target) })
+	assert.Panics(t, func() { mut.NewBatchQ(5, target) })
 
 	mut2 := NewMap4[
 		testRelationA, testStruct1, testStruct2, testStruct3,
@@ -311,7 +311,7 @@ func TestMap4Generated(t *testing.T) {
 
 	mut2.New(target)
 	mut2.NewBatch(5, target)
-	q2 := mut2.NewQuery(5, target)
+	q2 := mut2.NewBatchQ(5, target)
 	assert.Equal(t, 5, q2.Count())
 	q2.Close()
 
@@ -377,7 +377,7 @@ func TestMap5Generated(t *testing.T) {
 
 	mut.NewBatch(2)
 
-	q := mut.NewQuery(2)
+	q := mut.NewBatchQ(2)
 	q.Close()
 
 	mut.GetUnchecked(e)
@@ -395,7 +395,7 @@ func TestMap5Generated(t *testing.T) {
 
 	assert.Panics(t, func() { mut.New(target) })
 	assert.Panics(t, func() { mut.NewBatch(5, target) })
-	assert.Panics(t, func() { mut.NewQuery(5, target) })
+	assert.Panics(t, func() { mut.NewBatchQ(5, target) })
 
 	mut2 := NewMap5[
 		testRelationA, testStruct1, testStruct2, testStruct3,
@@ -404,7 +404,7 @@ func TestMap5Generated(t *testing.T) {
 
 	mut2.New(target)
 	mut2.NewBatch(5, target)
-	q2 := mut2.NewQuery(5, target)
+	q2 := mut2.NewBatchQ(5, target)
 	assert.Equal(t, 5, q2.Count())
 	q2.Close()
 
@@ -474,7 +474,7 @@ func TestMap6Generated(t *testing.T) {
 
 	mut.NewBatch(2)
 
-	q := mut.NewQuery(2)
+	q := mut.NewBatchQ(2)
 	q.Close()
 
 	mut.GetUnchecked(e)
@@ -492,7 +492,7 @@ func TestMap6Generated(t *testing.T) {
 
 	assert.Panics(t, func() { mut.New(target) })
 	assert.Panics(t, func() { mut.NewBatch(5, target) })
-	assert.Panics(t, func() { mut.NewQuery(5, target) })
+	assert.Panics(t, func() { mut.NewBatchQ(5, target) })
 
 	mut2 := NewMap6[
 		testRelationA, testStruct1, testStruct2, testStruct3,
@@ -501,7 +501,7 @@ func TestMap6Generated(t *testing.T) {
 
 	mut2.New(target)
 	mut2.NewBatch(5, target)
-	q2 := mut2.NewQuery(5, target)
+	q2 := mut2.NewBatchQ(5, target)
 	assert.Equal(t, 5, q2.Count())
 	q2.Close()
 
@@ -571,7 +571,7 @@ func TestMap7Generated(t *testing.T) {
 
 	mut.NewBatch(2)
 
-	q := mut.NewQuery(2)
+	q := mut.NewBatchQ(2)
 	q.Close()
 
 	mut.GetUnchecked(e)
@@ -589,7 +589,7 @@ func TestMap7Generated(t *testing.T) {
 
 	assert.Panics(t, func() { mut.New(target) })
 	assert.Panics(t, func() { mut.NewBatch(5, target) })
-	assert.Panics(t, func() { mut.NewQuery(5, target) })
+	assert.Panics(t, func() { mut.NewBatchQ(5, target) })
 
 	mut2 := NewMap7[
 		testRelationA, testStruct1, testStruct2, testStruct3,
@@ -598,7 +598,7 @@ func TestMap7Generated(t *testing.T) {
 
 	mut2.New(target)
 	mut2.NewBatch(5, target)
-	q2 := mut2.NewQuery(5, target)
+	q2 := mut2.NewBatchQ(5, target)
 	assert.Equal(t, 5, q2.Count())
 	q2.Close()
 
@@ -668,7 +668,7 @@ func TestMap8Generated(t *testing.T) {
 
 	mut.NewBatch(2)
 
-	q := mut.NewQuery(2)
+	q := mut.NewBatchQ(2)
 	q.Close()
 
 	mut.GetUnchecked(e)
@@ -686,7 +686,7 @@ func TestMap8Generated(t *testing.T) {
 
 	assert.Panics(t, func() { mut.New(target) })
 	assert.Panics(t, func() { mut.NewBatch(5, target) })
-	assert.Panics(t, func() { mut.NewQuery(5, target) })
+	assert.Panics(t, func() { mut.NewBatchQ(5, target) })
 
 	mut2 := NewMap8[
 		testRelationA, testStruct1, testStruct2, testStruct3,
@@ -695,7 +695,7 @@ func TestMap8Generated(t *testing.T) {
 
 	mut2.New(target)
 	mut2.NewBatch(5, target)
-	q2 := mut2.NewQuery(5, target)
+	q2 := mut2.NewBatchQ(5, target)
 	assert.Equal(t, 5, q2.Count())
 	q2.Close()
 
diff --git a/generic/relation_benchmark_test.go b/generic/relation_benchmark_test.go
index 2adab79..fea7d32 100644
--- a/generic/relation_benchmark_test.go
+++ b/generic/relation_benchmark_test.go
@@ -45,7 +45,7 @@ func benchmarkRelationGetWorld(b *testing.B, count int) {
 	target := world.NewEntity()
 
 	builder := ecs.NewBuilder(&world, relID).WithRelation(relID)
-	q := builder.NewQuery(count, target)
+	q := builder.NewBatchQ(count, target)
 	entities := make([]ecs.Entity, 0, count)
 	for q.Next() {
 		entities = append(entities, q.Entity())
@@ -73,7 +73,7 @@ func benchmarkRelationGetWorldUnchecked(b *testing.B, count int) {
 	target := world.NewEntity()
 
 	builder := ecs.NewBuilder(&world, relID).WithRelation(relID)
-	q := builder.NewQuery(count, target)
+	q := builder.NewBatchQ(count, target)
 	entities := make([]ecs.Entity, 0, count)
 	for q.Next() {
 		entities = append(entities, q.Entity())
@@ -100,7 +100,7 @@ func benchmarkRelationSet(b *testing.B, count int) {
 	target := world.NewEntity()
 
 	builder := ecs.NewBuilder(&world, relID).WithRelation(relID)
-	q := builder.NewQuery(count)
+	q := builder.NewBatchQ(count)
 	entities := make([]ecs.Entity, 0, count)
 	for q.Next() {
 		entities = append(entities, q.Entity())