示例#1
0
 /**
  * @return string
  */
 public function getQuery()
 {
     $setQueryPart = QueryPartsBuilder::buildNameValuePairStrings($this->nameValuePairs);
     $setQueryPart = QueryPartsBuilder::buildCSVString($setQueryPart);
     $selection = trim($this->selection);
     if (empty($selection)) {
         $query = "UPDATE {$this->tableName} SET {$setQueryPart}";
     } else {
         $query = "UPDATE {$this->tableName} SET {$setQueryPart} WHERE {$this->selection}";
     }
     return $query;
 }