comparison Framework/PostgreSQL/PostgreSQLParameters.cpp @ 429:dbf811b1bb43 pg-transactions

new configuration 'EnableVerboseLogs' to log SQL statements being executed
author Alain Mazy <am@osimis.io>
date Thu, 30 Nov 2023 14:47:23 +0100
parents 15bfd9a76f8d
children 8b7c1c423367
comparison
equal deleted inserted replaced
428:4d0bacbd0fba 429:dbf811b1bb43
42 lock_ = true; 42 lock_ = true;
43 maxConnectionRetries_ = 10; 43 maxConnectionRetries_ = 10;
44 connectionRetryInterval_ = 5; 44 connectionRetryInterval_ = 5;
45 readWriteTransactionStatement_ = "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE READ WRITE"; 45 readWriteTransactionStatement_ = "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE READ WRITE";
46 readOnlyTransactionStatement_ = "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY"; 46 readOnlyTransactionStatement_ = "SET TRANSACTION ISOLATION LEVEL SERIALIZABLE READ ONLY";
47 isVerboseEnabled_ = false;
47 } 48 }
48 49
49 50
50 PostgreSQLParameters::PostgreSQLParameters() 51 PostgreSQLParameters::PostgreSQLParameters()
51 { 52 {
93 94
94 ssl_ = configuration.GetBooleanValue("EnableSsl", false); 95 ssl_ = configuration.GetBooleanValue("EnableSsl", false);
95 } 96 }
96 97
97 lock_ = configuration.GetBooleanValue("Lock", true); // Use locking by default 98 lock_ = configuration.GetBooleanValue("Lock", true); // Use locking by default
99
100 isVerboseEnabled_ = configuration.GetBooleanValue("EnableVerboseLogs", false);
98 101
99 maxConnectionRetries_ = configuration.GetUnsignedIntegerValue("MaximumConnectionRetries", 10); 102 maxConnectionRetries_ = configuration.GetUnsignedIntegerValue("MaximumConnectionRetries", 10);
100 connectionRetryInterval_ = configuration.GetUnsignedIntegerValue("ConnectionRetryInterval", 5); 103 connectionRetryInterval_ = configuration.GetUnsignedIntegerValue("ConnectionRetryInterval", 5);
101 104
102 if (configuration.LookupStringValue(s, "ReadWriteTransactionStatement")) 105 if (configuration.LookupStringValue(s, "ReadWriteTransactionStatement"))