Continued:
authorRoland Häder <roland@mxchange.org>
Thu, 29 Oct 2020 13:20:24 +0000 (14:20 +0100)
committerRoland Häder <roland@mxchange.org>
Thu, 29 Oct 2020 13:20:24 +0000 (14:20 +0100)
- more debug lines added
- commented some out

Signed-off-by: Roland Häder <roland@mxchange.org>
framework/main/classes/database/backend/lfdb_legacy/class_CachedLocalFileDatabase.php

index 7b442104119c88a2856c953bc4dd563aac0b11d7..b4b547599b66e7346b6eab36f98ed9d2200947b8 100644 (file)
@@ -306,23 +306,31 @@ class CachedLocalFileDatabase extends BaseDatabaseBackend implements DatabaseBac
         */
        private function updatePrimaryKey (StoreableCriteria $dataSetInstance) {
                // Get table name from criteria
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CACHED-LFDB: dataSetInstance=%s - CALLED!', $dataSetInstance->__toString()));
                $tableName = $dataSetInstance->getTableName();
 
                // Get the information array from lower method
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CACHED-LFDB: tableName=%s', $tableName));
                $infoArray = $this->getContentsFromTableInfoFile($dataSetInstance);
 
                // Is the primary key there?
-               /* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CACHED-LFDB: tableInfo=' . print_r($this->tableInfo, true));
+               //* PRINTR-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CACHED-LFDB: tableInfo=' . print_r($this->tableInfo, true));
                if (!isset($this->tableInfo[$tableName]['primary'])) {
                        // Then create the info file
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CACHED-LFDB: Creating info table for tableName=%s ...', $tableName));
                        $this->createTableInfoFile($dataSetInstance);
                } elseif (($this->getConfigInstance()->getConfigEntry('db_update_primary_forced') == 'Y') && ($dataSetInstance->getPrimaryKey() != $this->tableInfo[$tableName]['primary'])) {
                        // Set the array element
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CACHED-LFDB: Setting primaryKey=%s for tableName=%s ...', $dataSetInstance->getPrimaryKey(), $tableName));
                        $this->tableInfo[$tableName]['primary'] = $dataSetInstance->getPrimaryKey();
 
                        // Update the entry
+                       //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput(sprintf('CACHED-LFDB: Updating info table for tableName=%s ...', $tableName));
                        $this->updateTableInfoFile($dataSetInstance);
                }
+
+               // Trace message
+               //* NOISY-DEBUG: */ self::createDebugInstance(__CLASS__, __LINE__)->debugOutput('CACHED-LFDB: EXIT!');
        }
 
        /**