Skip to content

Commit

Permalink
Merge pull request #3 from daniellienert/master
Browse files Browse the repository at this point in the history
[BUGFIX] Quoted propertyNames in order to allow sqlLite keywords as properties
  • Loading branch information
Christian Müller committed Mar 30, 2015
2 parents 437d295 + a3f28b8 commit 4cf22c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/Flowpack/SimpleSearch/Domain/Service/SqLiteIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ public function insertOrUpdatePropertiesToIndex($properties, $identifier) {
$valueNamesString = ':__identifier__, ';
$statementArgumentNumber = 1;
foreach ($properties as $propertyName => $propertyValue) {
$propertyColumnNamesString .= $propertyName . ', ';
$valueNamesString .= $this->preparedStatementArgumentName($statementArgumentNumber) . ' , ';
$propertyColumnNamesString .= '"' . $propertyName . '", ';
$valueNamesString .= '"' . $this->preparedStatementArgumentName($statementArgumentNumber) . '", ';
$statementArgumentNumber++;
}
$propertyColumnNamesString = trim($propertyColumnNamesString);
Expand Down Expand Up @@ -225,7 +225,7 @@ protected function loadAvailablePropertyFields() {
* @param string $propertyName
*/
protected function addPropertyToIndex($propertyName) {
$this->connection->exec('ALTER TABLE objects ADD COLUMN ' . $propertyName . ';');
$this->connection->exec('ALTER TABLE objects ADD COLUMN "' . $propertyName . '";');
$this->propertyFieldsAvailable[] = $propertyName;
}

Expand Down

0 comments on commit 4cf22c7

Please sign in to comment.