RelativePaths[] = $relativePath; return $this; } public function relativePaths(array $relativePaths): SelectQueryBuilder { $this->RelativePaths = $relativePaths; return $this; } public function from(string $target): SelectQueryBuilder { $this->From = "" . $target; return $this; } public function where(string $target, DeegraphEqualityOperator $operator, string $value): SelectQueryBuilder { $this->Where = "" . $target . " " . $operator->value . " " . $value; return $this; } public function instanceOf(string $schema): SelectQueryBuilder { $this->InstanceOf = "" . $schema; return $this; } public function build(): SelectQuery { $builder = "SELECT"; if(sizeof($this->RelativePaths)) $builder .= " " . implode(separator: ", ", array: $this->RelativePaths); if($this->From != "") $builder .= " FROM $this->From"; if($this->Where != "") $builder .= " WHERE $this->Where"; if($this->InstanceOf != "") $builder .= " INSTANCEOF $this->InstanceOf"; return new SelectQuery(queryString: $builder); } }