Commit 10fef9ee authored by Boudewijn Rempt's avatar Boudewijn Rempt

Make the Folder storage correctly iterate through the resources

Resources are now actually stored in the database, but
not versioned yet.
parent d77ad205
......@@ -18,6 +18,22 @@
*/
#include "KisAbrStorage.h"
#include "KisResourceStorage.h"
class AbrIterator : public KisResourceStorage::ResourceIterator
{
public:
bool hasNext() const override {return false; }
void next() const override {}
QString url() const override { return QString(); }
QString type() const override { return QString(); }
QDateTime lastModified() const override { return QDateTime(); }
/// This only loads the resource when called
QByteArray md5sum() const override { return QByteArray(); }
/// This only loads the resource when called
KoResourceSP resource() const override { return 0; }
};
KisAbrStorage::KisAbrStorage(const QString &location)
: KisStoragePlugin(location)
......@@ -41,7 +57,7 @@ KoResourceSP KisAbrStorage::resource(const QString &url)
return 0;
}
KisResourceStorage::ResourceIterator KisAbrStorage::resources(const QString &resourceType)
QSharedPointer<KisResourceStorage::ResourceIterator> KisAbrStorage::resources(const QString &resourceType)
{
return KisResourceStorage::ResourceIterator();
return QSharedPointer<KisResourceStorage::ResourceIterator>(new AbrIterator);
}
......@@ -31,7 +31,7 @@ public:
KisResourceStorage::ResourceItem resourceItem(const QString &url) override;
KoResourceSP resource(const QString &url) override;
KisResourceStorage::ResourceIterator resources(const QString &resourceType) override;
QSharedPointer<KisResourceStorage::ResourceIterator> resources(const QString &resourceType) override;
};
......
......@@ -18,6 +18,22 @@
*/
#include "KisAslStorage.h"
#include <KisResourceStorage.h>
class AslIterator : public KisResourceStorage::ResourceIterator
{
public:
bool hasNext() const override {return false; }
void next() const override {}
QString url() const override { return QString(); }
QString type() const override { return QString(); }
QDateTime lastModified() const override { return QDateTime(); }
/// This only loads the resource when called
QByteArray md5sum() const override { return QByteArray(); }
/// This only loads the resource when called
KoResourceSP resource() const override { return 0; }
};
KisAslStorage::KisAslStorage(const QString &location)
: KisStoragePlugin(location)
......@@ -40,7 +56,7 @@ KoResourceSP KisAslStorage::resource(const QString &url)
return 0;
}
KisResourceStorage::ResourceIterator KisAslStorage::resources(const QString &resourceType)
QSharedPointer<KisResourceStorage::ResourceIterator> KisAslStorage::resources(const QString &resourceType)
{
return KisResourceStorage::ResourceIterator();
return QSharedPointer<KisResourceStorage::ResourceIterator>(new AslIterator);
}
......@@ -29,8 +29,8 @@ public:
virtual ~KisAslStorage();
KisResourceStorage::ResourceItem resourceItem(const QString &url) override;
KoResourceSP resource(const QString &url) override;
KisResourceStorage::ResourceIterator resources(const QString &resourceType) override;
KoResourceSP resource(const QString &url) override;
QSharedPointer<KisResourceStorage::ResourceIterator> resources(const QString &resourceType) override;
};
......
......@@ -19,6 +19,23 @@
#include "KisBundleStorage.h"
#include "KisResourceStorage.h"
class BundleIterator : public KisResourceStorage::ResourceIterator
{
public:
bool hasNext() const override {return false; }
void next() const override {}
QString url() const override { return QString(); }
QString type() const override { return QString(); }
QDateTime lastModified() const override { return QDateTime(); }
/// This only loads the resource when called
QByteArray md5sum() const override { return QByteArray(); }
/// This only loads the resource when called
KoResourceSP resource() const override { return 0; }
};
KisBundleStorage::KisBundleStorage(const QString &location)
: KisStoragePlugin(location)
{
......@@ -38,7 +55,7 @@ KoResourceSP KisBundleStorage::resource(const QString &url)
return 0;
}
KisResourceStorage::ResourceIterator KisBundleStorage::resources(const QString &resourceType)
QSharedPointer<KisResourceStorage::ResourceIterator> KisBundleStorage::resources(const QString &resourceType)
{
return KisResourceStorage::ResourceIterator();
return QSharedPointer<KisResourceStorage::ResourceIterator>(new BundleIterator);
}
......@@ -30,7 +30,7 @@ public:
KisResourceStorage::ResourceItem resourceItem(const QString &url) override;
KoResourceSP resource(const QString &url) override;
KisResourceStorage::ResourceIterator resources(const QString &resourceType) override;
QSharedPointer<KisResourceStorage::ResourceIterator> resources(const QString &resourceType) override;
};
#endif // KISBUNDLESTORAGE_H
......@@ -20,7 +20,7 @@
#include "KisFolderStorage.h"
#include <QDirIterator>
#include <KisMimeDatabase.h>
#include <kis_debug.h>
#include <KisResourceLoaderRegistry.h>
......@@ -32,7 +32,7 @@ public:
QByteArray md5sum() const override
{
KisResourceLoaderBase *loader = KisResourceLoaderRegistry::instance()->get(resourceType);
KisResourceLoaderBase *loader = KisResourceLoaderRegistry::instance()->loader(folder, KisMimeDatabase::mimeTypeForFile(url));
if (loader) {
QFile f(url);
f.open(QFile::ReadOnly);
......@@ -53,10 +53,8 @@ public:
: m_location(location)
, m_resourceType(resourceType)
{
m_loader = KisResourceLoaderRegistry::instance()->get(resourceType);
KIS_ASSERT(m_loader);
m_dirIterator.reset(new QDirIterator(location + '/' + resourceType,
m_loader->filters(),
KisResourceLoaderRegistry::instance()->filters(resourceType),
QDir::Files | QDir::Readable,
QDirIterator::Subdirectories));
}
......@@ -109,17 +107,22 @@ public:
protected:
bool loadResourceInternal() const {
if (!m_resource && m_resource->filename() != m_dirIterator->filePath()) {
if (!m_resource || (m_resource && m_resource->filename() != m_dirIterator->filePath())) {
QFile f(m_dirIterator->filePath());
f.open(QFile::ReadOnly);
const_cast<FolderIterator*>(this)->m_resource = m_loader->load(m_dirIterator->filePath(), f);
if (!m_loader) {
const_cast<FolderIterator*>(this)->m_loader = KisResourceLoaderRegistry::instance()->loader(m_resourceType, KisMimeDatabase::mimeTypeForFile(m_dirIterator->filePath()));
}
if (m_loader) {
const_cast<FolderIterator*>(this)->m_resource = m_loader->load(m_dirIterator->filePath(), f);
}
f.close();
}
return !m_resource.isNull();
}
KoResourceSP m_resource;
KisResourceLoaderBase *m_loader {0};
KoResourceSP m_resource;
QScopedPointer<QDirIterator> m_dirIterator;
const QString m_location;
const QString m_resourceType;
......@@ -140,9 +143,8 @@ KisResourceStorage::ResourceItem KisFolderStorage::resourceItem(const QString &u
QFileInfo fi(url);
FolderItem item;
item.url = url;
item.resourceType = fi.path().split("/").last();
item.folder = fi.path().split("/").last();
item.lastModified = fi.lastModified();
return item;
}
......@@ -158,7 +160,7 @@ KoResourceSP KisFolderStorage::resource(const QString &url)
return res;
}
KisResourceStorage::ResourceIterator KisFolderStorage::resources(const QString &resourceType)
QSharedPointer<KisResourceStorage::ResourceIterator> KisFolderStorage::resources(const QString &resourceType)
{
return FolderIterator(location(), resourceType);
return QSharedPointer<KisResourceStorage::ResourceIterator>(new FolderIterator(location(), resourceType));
}
......@@ -22,7 +22,9 @@
#include <KisStoragePlugin.h>
class KisFolderStorage : public KisStoragePlugin
#include <kritaresources_export.h>
class KRITARESOURCES_EXPORT KisFolderStorage : public KisStoragePlugin
{
public:
KisFolderStorage(const QString &location);
......@@ -30,7 +32,7 @@ public:
KisResourceStorage::ResourceItem resourceItem(const QString &url) override;
KoResourceSP resource(const QString &url) override;
KisResourceStorage::ResourceIterator resources(const QString &resourceType) override;
QSharedPointer<KisResourceStorage::ResourceIterator> resources(const QString &resourceType) override;
};
......
......@@ -24,24 +24,14 @@
#include <QDirIterator>
#include <KritaVersionWrapper.h>
#include <klocalizedstring.h>
#include <kis_debug.h>
#include "KisResourceLocator.h"
#include "KisResourceLoaderRegistry.h"
const QString dbDriver = "QSQLITE";
const QStringList KisResourceCacheDb::resourceTypes = QStringList() << "BRUSH_TIP"
<< "GRADIENT"
<< "PAINTOP_PRESET"
<< "COLORSET"
<< "PATTERN"
<< "SYMBOL_LIBRARY"
<< "TEMPLATE"
<< "WORKSPACE"
<< "SESSION"
<< "UNKNOWN";
const QStringList KisResourceCacheDb::storageTypes = QStringList() << "UNKNOWN"
<< "FOLDER"
<< "BUNDLE"
......@@ -206,7 +196,7 @@ QSqlError initDb(const QString &location)
QFile f(":/fill_resource_types.sql");
if (f.open(QFile::ReadOnly)) {
QString sql = f.readAll();
Q_FOREACH(const QString &resourceType, KisResourceCacheDb::resourceTypes) {
Q_FOREACH(const QString &resourceType, KisResourceLoaderRegistry::instance()->resourceTypes()) {
QSqlQuery query(sql);
query.addBindValue(resourceType);
if (!query.exec()) {
......@@ -255,7 +245,7 @@ bool KisResourceCacheDb::initialize(const QString &location)
return s_valid;
}
bool KisResourceCacheDb::addResource(KisResourceStorageSP storage, KoResourceSP resource)
bool KisResourceCacheDb::addResource(KisResourceStorageSP storage, KoResourceSP resource, const QString &resourceType)
{
bool r = true;
......@@ -269,8 +259,37 @@ bool KisResourceCacheDb::addResource(KisResourceStorageSP storage, KoResourceSP
return false;
}
// Check whether it already exists
/* // Check whether it already exists
if (hasResource(storage, resource)) {
r = addResourceVersion(storage, resource);
}
else*/ {
QSqlQuery q;
r = q.prepare("INSERT INTO resources "
"(resource_type_id, name, tooltip, thumbnail, status)"
"VALUES"
"((select id from resource_types where name = :resource_type), :name, :tooltip, :thumbnail, :status);");
if (!r) {
qWarning() << "Could not prepare addResource statement" << q.lastError();
return r;
}
q.bindValue(":resource_type", resourceType);
q.bindValue(":name", resource->name());
q.bindValue(":tooltip", i18n(resource->name().toUtf8()));
q.bindValue(":thumbnail", resource->image());
q.bindValue(":status", 1);
r = q.exec();
if (!r) {
qWarning() << "Could not execute addResource statement" << q.boundValues() << q.lastError();
return r;
}
}
// Then add a new version
qDebug() << "Adding" << resource->filename();
// Insert it
......@@ -279,12 +298,14 @@ bool KisResourceCacheDb::addResource(KisResourceStorageSP storage, KoResourceSP
bool KisResourceCacheDb::addResources(KisResourceStorageSP storage, QString folder)
{
KisResourceStorage::ResourceIterator iter = storage->resources(folder);
while(iter.hasNext()) {
iter.next();
KoResourceSP res = iter.resource();
if (!addResource(storage, res)) {
qWarning() << "Could not add resource" << res->filename() << "to the database";
QSharedPointer<KisResourceStorage::ResourceIterator> iter = storage->resources(folder);
while(iter->hasNext()) {
iter->next();
KoResourceSP res = iter->resource();
if (res) {
if (!addResource(storage, res, iter->type())) {
qWarning() << "Could not add resource" << res->filename() << "to the database";
}
}
}
return true;
......
......@@ -40,7 +40,6 @@ public:
static const QString dbLocationKey; ///< configuration key for the location of the database
static const QString resourceCacheDbFilename; ///< filename of the database
static const QString databaseVersion; ///< current schema version
static const QStringList resourceTypes; ///< all types of resources
static const QStringList storageTypes; ///< kinds of places where resources can be stored
/**
......@@ -66,7 +65,7 @@ private:
~KisResourceCacheDb();
KisResourceCacheDb operator=(const KisResourceCacheDb&);
static bool addResource(KisResourceStorageSP storage, KoResourceSP resource);
static bool addResource(KisResourceStorageSP storage, KoResourceSP resource, const QString &resourceType);
static bool addResources(KisResourceStorageSP storage, QString folder);
static bool addStorage(KisResourceStorageSP storage, bool preinstalled);
static bool synchronize(KisResourceStorageSP storage);
......
......@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
#include <KisResourceLoader.h>
#include <QDebug>
#include <KisMimeDatabase.h>
/**
......@@ -33,6 +33,7 @@ QStringList KisResourceLoaderBase::filters() const
filters << "*." + suffix;
}
}
return filters;
}
......
......@@ -40,10 +40,10 @@ class KRITARESOURCES_EXPORT KisResourceLoaderBase
{
public:
KisResourceLoaderBase(const QString &id, const QString &folder, const QStringList &mimetypes)
KisResourceLoaderBase(const QString &resourceSubType, const QString &resourceType, const QStringList &mimetypes)
{
m_id = id;
m_folder = folder;
m_resourceSubType = resourceSubType;
m_resourceType = resourceType;
m_mimetypes = mimetypes;
}
......@@ -69,12 +69,12 @@ public:
* @return the folder in the resource storage where resources
* of this type are located
*/
QString folder() const
QString resourceType() const
{
return m_folder;
return m_resourceType;
}
QString resourceType() const
QString resourceSubType() const
{
return id();
}
......@@ -82,7 +82,7 @@ public:
/// For registration in KisResourceLoaderRegistry
QString id() const
{
return m_id;
return m_resourceSubType;
}
/**
......@@ -92,8 +92,8 @@ public:
virtual KoResourceSP load(const QString &name, QIODevice &dev) { Q_UNUSED(name); Q_UNUSED(dev); return 0; };
private:
QString m_id;
QString m_folder;
QString m_resourceSubType;
QString m_resourceType;
QStringList m_mimetypes;
};
......
......@@ -21,6 +21,7 @@
#include <QApplication>
#include <QString>
#include <QDebug>
KisResourceLoaderRegistry::KisResourceLoaderRegistry(QObject *parent)
: QObject(parent)
......@@ -41,11 +42,41 @@ KisResourceLoaderRegistry* KisResourceLoaderRegistry::instance()
return reg;
}
QSet<QString> KisResourceLoaderRegistry::resourceFolders() const
KisResourceLoaderBase *KisResourceLoaderRegistry::loader(const QString &resourceType, const QString &mimetype) const
{
Q_FOREACH(KisResourceLoaderBase *loader, resourceTypeLoaders(resourceType)) {
if (loader->mimetypes().contains(mimetype)) return loader;
}
return 0;
}
QVector<KisResourceLoaderBase *> KisResourceLoaderRegistry::resourceTypeLoaders(const QString &resourceType) const
{
QVector<KisResourceLoaderBase *> r;
Q_FOREACH(KisResourceLoaderBase *loader, values()) {
if (loader->resourceType() == resourceType) {
r << loader;
}
}
return r;
}
QStringList KisResourceLoaderRegistry::filters(const QString &resourceType) const
{
QStringList r;
Q_FOREACH(KisResourceLoaderBase *loader, resourceTypeLoaders(resourceType)) {
r.append(loader->filters());
}
return r;
}
QSet<QString> KisResourceLoaderRegistry::resourceTypes() const
{
QStringList r;
Q_FOREACH(KisResourceLoaderBase *loader, values()) {
r << loader->folder();
r << loader->resourceType();
}
return QSet<QString>::fromList(r);
}
......@@ -28,6 +28,12 @@
#include <kritaresources_export.h>
/**
* @brief The KisResourceLoaderRegistry class manages the loader plugins for resources. Every resource can be loaded
* by a KisResourceLoader instance. A loader corresponds to a particular file type. Resources are organized in
* folders that represent the main type of a certain resource (brushes) and subtypes, that identify a particular
* resource format (gbr, gih, png, svg).
*/
class KRITARESOURCES_EXPORT KisResourceLoaderRegistry : public QObject, public KoGenericRegistry<KisResourceLoaderBase*>
{
Q_OBJECT
......@@ -36,10 +42,27 @@ public:
static KisResourceLoaderRegistry *instance();
QSet<QString> resourceFolders() const;
/// @return the first loader for the given resource type and mimetype
KisResourceLoaderBase *loader(const QString &resourceType, const QString &mimetype) const;
/**
* @return a list of extensions that can be present for the given resource type
*/
QStringList filters(const QString &resourceType) const;
/**
* @return the list of folders for which resource loaders have been registered
*/
QSet<QString> resourceTypes() const;
private:
/**
* @return a list of loader plugins that can handle the resources stored in the folder. A folder can contain multiple subtypes.
*/
QVector<KisResourceLoaderBase*> resourceTypeLoaders(const QString &resourceType) const;
KisResourceLoaderRegistry(QObject *parent);
KisResourceLoaderRegistry(const KisResourceLoaderRegistry&);
KisResourceLoaderRegistry operator=(const KisResourceLoaderRegistry&);
......
......@@ -129,9 +129,10 @@ QStringList KisResourceLocator::errorMessages() const
KisResourceLocator::LocatorError KisResourceLocator::firstTimeInstallation(InitalizationStatus initalizationStatus, const QString &installationResourcesLocation)
{
qDebug() << "firstTimeInstallation" << installationResourcesLocation;
Q_UNUSED(initalizationStatus);
Q_FOREACH(const QString &folder, KisResourceLoaderRegistry::instance()->resourceFolders()) {
Q_FOREACH(const QString &folder, KisResourceLoaderRegistry::instance()->resourceTypes()) {
QDir dir(d->resourceLocation + '/' + folder + '/');
if (!dir.exists()) {
if (!QDir().mkpath(d->resourceLocation + '/' + folder + '/')) {
......@@ -141,7 +142,7 @@ KisResourceLocator::LocatorError KisResourceLocator::firstTimeInstallation(Inita
}
}
Q_FOREACH(const QString &folder, KisResourceLoaderRegistry::instance()->resourceFolders()) {
Q_FOREACH(const QString &folder, KisResourceLoaderRegistry::instance()->resourceTypes()) {
QDir dir(installationResourcesLocation + '/' + folder + '/');
if (dir.exists()) {
Q_FOREACH(const QString &entry, dir.entryList(QDir::Files | QDir::Readable)) {
......@@ -169,24 +170,24 @@ KisResourceLocator::LocatorError KisResourceLocator::firstTimeInstallation(Inita
bool KisResourceLocator::initializeDb()
{
QStringList filters = QStringList() << "*.bundle" << "*.abr" << "*.asl";
QDirIterator iter(d->resourceLocation, filters, QDir::Files, QDirIterator::Subdirectories);
while (iter.hasNext()) {
iter.next();
qDebug() << "Considering storage" << iter.filePath();
KisResourceStorageSP storage = QSharedPointer<KisResourceStorage>::create(iter.filePath());
if (!KisResourceCacheDb::addStorage(storage, true)) {
d->errorMessages.append(i18n("Could not add storage %1 to the cache database").arg(iter.filePath()));
return false;
qDebug() << "initalizeDb";
findStorages();
Q_FOREACH(KisResourceStorageSP storage, d->storages) {
if (!KisResourceCacheDb::addStorage(storage, (storage->type() == KisResourceStorage::StorageType::Folder ? false : true))) {
d->errorMessages.append(i18n("Could not add storage %1 to the cache database").arg(storage->location()));
}
Q_FOREACH(const QString &folder, KisResourceLoaderRegistry::instance()->resourceFolders()) {
Q_FOREACH(const QString &folder, KisResourceLoaderRegistry::instance()->resourceTypes()) {
qDebug() << "Adding storage" << storage->location() << "folder" << folder;
if (!KisResourceCacheDb::addResources(storage, folder)) {
d->errorMessages.append(i18n("Could not add resource type %1 to the cache database").arg(folder));
return false;
}
}
}
KisResourceCacheDb::addStorage(QSharedPointer<KisResourceStorage>::create(d->resourceLocation), false);
qDebug() << d->errorMessages;
return true;
}
......
/*
* Copyright (C) 2018 Boudewijn Rempt <boud@valdyas.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "KisResourceModel.h"
KisResourceModel::KisResourceModel()
{
setTable("resources");
}
/*
* Copyright (C) 2018 Boudewijn Rempt <boud@valdyas.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public License
* along with this library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KISRESOURCEMODEL_H
#define KISRESOURCEMODEL_H
#include <QSqlRelationalTableModel>
class KisResourceModel : public QSqlRelationalTableModel
{
Q_OBJECT
public:
KisResourceModel();
};
#endif // KISRESOURCEMODEL_H
......@@ -20,6 +20,7 @@
#include "KisResourceStorage.h"
#include <QFileInfo>
#include <QDebug>
#include <kzip.h>
......@@ -104,7 +105,7 @@ KoResourceSP KisResourceStorage::resource(const QString &url)
return d->storagePlugin->resource(url);
}
KisResourceStorage::ResourceIterator KisResourceStorage::resources(const QString &resourceType)
QSharedPointer<KisResourceStorage::ResourceIterator> KisResourceStorage::resources(const QString &resourceType)
{
return d->storagePlugin->resources(resourceType);
}
......
......@@ -25,7 +25,6 @@
#include <QString>
#include <QDateTime>
#include <KoResource.h>
#include <kritaresources_export.h>
......@@ -48,6 +47,7 @@ public:
virtual ~ResourceItem() {}
QString url;
QString folder;
QString resourceType;
QDateTime lastModified;
virtual QByteArray md5sum() const {return QByteArray();}
......@@ -60,16 +60,16 @@ public:
virtual ~ResourceIterator() {}
virtual bool hasNext() const {return false;};
virtual void next() const{};
virtual bool hasNext() const = 0;
virtual void next() const = 0;
virtual QString url() const {return QString();}
virtual QString type() const {return QString();}
virtual QDateTime lastModified() const {return QDateTime();}
virtual QString url() const = 0;
virtual QString type() const = 0;
virtual QDateTime lastModified() const = 0;
/// This only loads the resource when called
virtual QByteArray md5sum() const {return QByteArray();}
virtual QByteArray md5sum() const = 0;
/// This only loads the resource when called
virtual KoResourceSP resource() const {return 0;}
virtual KoResourceSP resource() const = 0;
};
enum class StorageType : int {
......@@ -91,7 +91,7 @@ public:
ResourceItem resourceItem(const QString &url);
KoResourceSP resource(const QString &url);
ResourceIterator resources(const QString &resourceType);
QSharedPointer<ResourceIterator> resources(const QString &resourceType);
private:
class Private;
......
......@@ -40,7 +40,7 @@ public:
virtual KisResourceStorage::ResourceItem resourceItem(const QString &url) = 0;
virtual KoResourceSP resource(const QString &url) = 0;
virtual KisResourceStorage::ResourceIterator resources(const QString &resourceType) = 0;
virtual QSharedPointer<KisResourceStorage::ResourceIterator> resources(const QString &resourceType) = 0;
protected:
QString location() const;
......
......@@ -15,5 +15,6 @@
<file alias="create_resource_tags.sql">sql/create_resource_tags.sql</file>
<file alias="get_version_information.sql">sql/get_version_information.sql</file>
<file alias="create_index_storages.sql">sql/create_index_storages.sql</file>
<file alias="select_resource.sql">sql/select_resource.sql</file>
</qresource>
</RCC>
......@@ -2,7 +2,9 @@ CREATE TABLE IF NOT EXISTS resources (
id INTEGER PRIMARY KEY
, resource_type_id INTEGER
, name TEXT
, filename TEXT