resetDataCache example

// if cache has been built already         if (empty($this->dataCache['table_names'])) {
            $key = array_search(
                strtolower($tableName),
                array_map('strtolower', $this->dataCache['table_names']),
                true
            );

            // table doesn't exist but still in cache - lets reset cache, it can be rebuilt later             // OR if table does exist but is not found in cache             if (($key !== false && ! $tableExists) || ($key === false && $tableExists)) {
                $this->resetDataCache();
            }
        }

        return $tableExists;
    }

    /** * Fetch Field Names * * @return array|false * * @throws DatabaseException */
$this->createTable();

        $this->copyData();

        $this->forge->dropTable("temp_{$this->tableName}");

        $success = $this->db->transComplete();

        $this->db->query('PRAGMA foreign_keys = ON');

        $this->db->resetDataCache();

        return $success;
    }

    /** * Drops columns from the table. * * @param array|string $columns * * @return Table */
    
Home | Imprint | This part of the site doesn't use cookies.