From a3f28b87483c950f193549bd881974a25b2f2f2e Mon Sep 17 00:00:00 2001 From: Daniel Lienert Date: Mon, 30 Mar 2015 21:25:58 +0200 Subject: [PATCH] [BUGFIX] Quoted properyNames in order to allow sqlLite heywords as property names --- .../Flowpack/SimpleSearch/Domain/Service/SqLiteIndex.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Flowpack/SimpleSearch/Domain/Service/SqLiteIndex.php b/Classes/Flowpack/SimpleSearch/Domain/Service/SqLiteIndex.php index d35e1a2..aec06b3 100644 --- a/Classes/Flowpack/SimpleSearch/Domain/Service/SqLiteIndex.php +++ b/Classes/Flowpack/SimpleSearch/Domain/Service/SqLiteIndex.php @@ -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); @@ -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; }