Refactored persistence with mysql and sqlite to factorize more things with a CMS_STORAGE_SQL .. based only on sql statement execution.

Various changes
This commit is contained in:
2015-01-21 12:02:36 +01:00
parent 4dcc1b0e04
commit bba0364a2c
43 changed files with 1545 additions and 2350 deletions

View File

@@ -13,6 +13,7 @@
<library name="cms" location="..\..\cms-safe.ecf" readonly="false"/>
<library name="cms_demo_module" location="modules\demo\cms_demo_module-safe.ecf" readonly="false"/>
<library name="persistence_mysql" location="..\..\library\persistence\implementation\mysql\persistence_mysql-safe.ecf" readonly="false"/>
<library name="persistence_sqlite" location="..\..\library\persistence\implementation\sqlite\persistence_sqlite-safe.ecf" readonly="false"/>
<library name="layout" location="..\..\library\layout\layout-safe.ecf" readonly="false"/>
<library name="wsf" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\wsf-safe.ecf"/>

View File

@@ -1,10 +1,17 @@
{
"database": {
"datasource": {
"driver": "MySQL",
"driver": "sqlite",
"environment": "sqlite_development"
},
"olddatasource": {
"driver": "null",
"environment": "development"
},
"environments": {
"sqlite_development": {
"connection_string":"Server=localhost;Port=3306;Database=site/cms_lite.db;Uid=root;Pwd=;"
},
"test": {
"connection_string":"Server=localhost;Port=3306;Database=cms_dev;Uid=root;Pwd=;"
},
@@ -29,4 +36,4 @@
}

View File

@@ -1,6 +1,6 @@
[layout]
root-dir=site/www
themes-dir=site/themes
themes-dir=site/www/themes
[site]
name=Eiffel CMS

View File

@@ -148,6 +148,7 @@ feature -- CMS setup
to_implement ("To implement custom storage")
end
a_setup.storage_drivers.force (create {CMS_STORAGE_MYSQL_BUILDER}.make, "mysql")
a_setup.storage_drivers.force (create {CMS_STORAGE_SQLITE_BUILDER}.make, "sqlite")
end
end