* zin: support to query root in commands.

This commit is contained in:
sunhao
2024-03-01 17:35:20 +08:00
parent ab4bfc4423
commit afefdd990d
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -72,6 +72,11 @@ class query
'commands' => $this->commands
);
}
public function isRoot(): bool
{
return count($this->selectors) === 1 && $this->selectors[0]->tag === 'root';
}
}
/**