feat: full query

This commit is contained in:
cha0s 2022-09-15 11:44:48 -05:00
parent 22d9c7cd45
commit 4834b5b294

View File

@ -32,6 +32,16 @@ export default class Query {
} }
reindex(entities) { reindex(entities) {
if (0 === this.$$compiled.with.length && 0 === this.$$compiled.without.length) {
for (let i = 0; i < entities.length; ++i) {
const entity = entities[i];
const index = this.$$index.indexOf(entity);
if (-1 === index) {
this.$$index.push(entity);
}
}
return;
}
for (let i = 0; i < entities.length; ++i) { for (let i = 0; i < entities.length; ++i) {
const entity = entities[i]; const entity = entities[i];
const index = this.$$index.indexOf(entity); const index = this.$$index.indexOf(entity);