ValidateValues($this); $builder = "INSERT INTO $this->RelativePath"; if(sizeof($this->Keys) > 0) $builder .= "KEYS " . implode(separator: ", ", array: $this->Keys); if(sizeof($this->Schemas) > 0) $builder .= "SCHEMAS " . implode(separator: ", ", array: $this->Schemas); if($this->Values != "") $builder .= "VALUES $this->Values"; if($this->Duplicate) $builder .= "DUPLICATE"; if($this->Replace) $builder .= "REPLACE"; return $builder; } public function RelativePath(string $relativePath): InsertQuery { self::ValidateDeegraphPath(target: $relativePath); $this->RelativePath = $relativePath; return $this; } public function Keys(string $keys): InsertQuery { $this->Keys = $keys; return $this; } public function Schemas(string $schemas): InsertQuery { $this->Schemas = $schemas; return $this; } public function Values(string $values): InsertQuery { $this->Values .= $values; return $this; } public function Duplicate(): InsertQuery { $this->Duplicate = true; return $this; } public function Replace(): InsertQuery { $this->Replace = true; return $this; } }