Added a common database backend implementation.
Added sqlite (proof of concept)
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"database": {
|
||||
"datasource": {
|
||||
"driver": "SQL Server",
|
||||
"environment": "test"
|
||||
"driver": "MySQL",
|
||||
"environment": "development"
|
||||
},
|
||||
"environments": {
|
||||
"test": {
|
||||
"connection_string":"Server=JVELILLA\\SQLEXPRESS;Database=example;Uid=sa;Pwd=Eiffel1405;TrustedConnection=Yes"
|
||||
"connection_string":"Server=localhost;Port=3306;Database=cms_dev;Uid=root;Pwd=;"
|
||||
},
|
||||
"development": {
|
||||
"connection_string":"Server=sql.ise;Database=ESA_DB_TEST;Uid=eiffel2;Pwd=eiffel2;"
|
||||
"connection_string":"Server=localhost;Port=3306;Database=cms;Uid=root;Pwd=;"
|
||||
},
|
||||
"production": {
|
||||
"connection_string":"Server=SQLSERVER;Database=LIVE_DATABASE;Uid=XXX;Pwd=YYY;"
|
||||
"connection_string":""
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -24,7 +24,7 @@
|
||||
"backup_count":"4"
|
||||
},
|
||||
"server": {
|
||||
"mode":"web"
|
||||
"mode":"api"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ feature -- Factory
|
||||
create l_email_service.make ((create {JSON_CONFIGURATION}).new_smtp_configuration(l_layout.application_config_path))
|
||||
|
||||
if attached (create {JSON_CONFIGURATION}).new_database_configuration (l_layout.application_config_path) as l_database_config then
|
||||
create {DATABASE_CONNECTION_MYSQL} l_database.login_with_schema ("cms", "root", "")
|
||||
create {DATABASE_CONNECTION_MYSQL} l_database.login_with_connection_string (l_database_config.connection_string)
|
||||
create l_api_service.make_with_database (l_database)
|
||||
create Result.make (l_database, l_api_service, l_email_service, l_layout)
|
||||
if (create {ROC_JSON_CONFIGURATION}).is_web_mode(l_layout.application_config_path) then
|
||||
|
||||
@@ -45,7 +45,4 @@ feature -- Access
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user