Mercurial > hg > orthanc-databases
diff Odbc/Plugins/IndexPlugin.cpp @ 586:3b1070dcab2f find-refactoring tip
fix
author | Alain Mazy <am@orthanc.team> |
---|---|
date | Mon, 04 Nov 2024 22:52:58 +0100 |
parents | 54d518dcd74a |
children |
line wrap: on
line diff
--- a/Odbc/Plugins/IndexPlugin.cpp Mon Nov 04 18:38:32 2024 +0100 +++ b/Odbc/Plugins/IndexPlugin.cpp Mon Nov 04 22:52:58 2024 +0100 @@ -113,7 +113,14 @@ "No connection string provided for the ODBC index"); } - std::unique_ptr<OrthancDatabases::OdbcIndex> index(new OrthancDatabases::OdbcIndex(context, connectionString)); + bool readOnly = configuration.GetBooleanValue("ReadOnly", false); + + if (readOnly) + { + LOG(WARNING) << "READ-ONLY SYSTEM: the Database plugin is working in read-only mode"; + } + + std::unique_ptr<OrthancDatabases::OdbcIndex> index(new OrthancDatabases::OdbcIndex(context, connectionString, readOnly)); index->SetMaxConnectionRetries(maxConnectionRetries); index->SetConnectionRetryInterval(connectionRetryInterval);