Commit Graph

5 Commits

Author SHA1 Message Date
Friedrich Wilckens
7313ccfb27 Typehandler simplification and other modernizations in Poco::Data (#5136)
* TypeHandler for std::tuple, used to implement TypeHandler for Poco::Tuple

* Removed obsolete using declarations in Data.cppm

* TypeHander: added missing typename

* Explicitly delete constructors of AbstractTypeHandler

* TypeHandler specialization for std::optional

* Data/MySQL: modernize loops and usage of virtual/override

* Poco::Tuple: formatting fix

* Poco::Data: more consistent usage of virtual/override and = delete

* Added test cases for std::tuple and std::optional (for MySQL and PostgreSQL)

* Poco::Data: more override annotations

* Added testcases for st::tuple and std::optional to SQLite.

* chore(Data): Improvements suggested by clang-tidy

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2025-12-23 11:01:37 +01:00
Matej Kenda
a6648ee8c3 Foundation simplifications with modern cpp (#5086)
* enh(Logger): simplified logging macros.

* enh(Delegate): Simplify code with constexpr and std::conditional_t.

* enh(NumericString): Simplify code with constexpr and std::is_signed_v.

* enh(MetaProgramming): Simplify code with C++17 equivalents.

* enh(Tuple): Simplify code with C++17 equivalents.

* enh(TypeList): Remove metaprogramming features that are not used.

* enh(Modules): Remove obsolete Foundation functionality

* enh(Foundation): Compile and run deprecated functionality only when POCO_TEST_DEPRECATED is enabled. Update comments for deprecated functionality.

* fix(Modules): Add missing conditional forward declarations for Foundation.
2025-12-16 07:53:45 +01:00
Matej Kenda
51f3749fa0 MongoDB replica set support (#5068)
* feature(MongoDB): Initial implementation of support for replica sets.

* enh(MongoDB): Add parsing of mongodb replica set URI.

* enh(MongoDB): Treat single-server as primary, fix parsing of URI.

* fix(MongoDB): Add missing example for parsing the URI.

* enh(MongoDB): simplified and modernised code.

* fix(MongoDB): Fixes based on static analysis report.

* enh(MongoDB): Remove unused includes.

* fix(MongoDB): ReplicaSetMonitor: handle wrong arguments more gracefully.

* enh(MongoDB) Use string literals and char constants where possible.

* enh(MongoDB) More tests.

* fix(MongoDB): Prevent duplicate entries in MongoDB::Document.

* enh(MongoDB): Update RS tests, remove support for pre 5.1 MongoDB.

* enh(MongoDB): Use C++ std mutex primitives instead of Poco.

* fix(MongoDB): correct replica set compile errors.

* fix(MongoDB): fix replica set tests to work with IPv6 addresses.

* enh(MongoDB): Remove confusing hosts from ServerDescription and use hosts from "hello" only to discover replica set hosts.

* enh(MongoDB): fix unused variables in tests.

* enh(MongoDB): Add read-preference validation to replica set connection and pool.

* chore(MongoDB): Add reserve to Document.

* enh(MongoDB): connect to server in pool activateObject.

* chore(MongoDB): use tried servers set only locally inside executeWithRetry.

* enh(MongoDB): Add support for ReplicaSetConnection to OpMsgCursor.

* enh(MongoDB): Replica set: More robust retry of failed MongoDB commands.

* enh(MongoDB): ReplicaSet remove redundant function, update documentation.

* enh(MongoDB): Update handling of URL parameters.

* enh(MongoDB): Updates to use SSL socket factory.

* enh(MongoDB): Log topology change when detected.

* enh(MongoDB): Move function to wait for the server availability to ReplicaSet.

* enh(MongoDB): Replica set: send notification on topology change.

* enh(MongoDB): Replica set: Remove internal logger for

* enh(MongoDB): Replica set: Remove internal logger for topology change. Use notification instead.

* enh(MongoDB): Update samples and replica set readme.

* enh(MongoDB): Fix parsing replica set URI.

* enh(MongoDB): Introduce ReplicaSetURI for handling custom URI.

* fix(MongoDB): heartbeatFrequency --> heartbeatFrequencyMS to match standard URL

* enh(MongoDB): Introduce constants in ReplicaSetURI.

* chore(MongoDB): Minor enhancements.

* enh(MongoDB): Correct logic to determine replica set topology from discovered servers.

* enh(MongoDB): Remove redundant code when parsing hello response.

* enh(MongoDB): Prevent servers from different replica set to be used in the topology.

* enh(MongoDB): Mark topology with incompatible servers as Unknown.

* enh(CI): Speed-up build by using cmake --build --parallel 4

* enh(CI): Upgrade codeql from v3 to v4

https://github.blog/changelog/2025-10-28-upcoming-deprecation-of-codeql-action-v3/

* enh(modules): Update MongoDB module to reflect latest state.

enh(MongoDB): Remove dead code and mark Message as implementation detail.

enh(CI): Fix build of C++ modules

* fix(C++ modules): Use C++20 features in samples, not C++23.

* docs(MongoDB): Clarify RTT limitation in Nearest read preference
2025-12-16 07:49:36 +01:00
Aleksandar Fabijanic
03dedff47e 5069 missing dll (#5071)
* fix(SharedLibrary): Missing DLLs not reported #5069

* fix(CMake): not producing proper binary names #5070

* fix(SharedLibrary): disable shared lib tests in static build #5069

* fix(misc): add pdjson links to gitignore, remove unused var in SharedLibrary, harden TaskManagerTest

* fic(ci): separate oracle and sqlserver odbc (out of disk space) (#5075)

* fic(ci): separate oracle and sqlserver odbc (out of disk space)

* use oracle odbc driver

* use oracle free

* ad db user

* postpone adding user after build

* remove default tablespace (does not exist)

* reinstate all ci jobs

* add postgresl odb tests to ci

* remove spurious syminks

* fix gitignore (pdjson)

* Remove VS projects #5076

* chore: revert leftover ODB IP address

* fix(CodeQL): float comparison alerts

* fix: compile errors

* chore: upgrade asan to macos-14 (tryout)

* fix(CI): Github macos-13 runner is deprecated, use macos-15-intel to run tests on Intel macOS

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2025-12-09 02:04:50 +01:00
Miko
041e7feeb7 Add support for modules (#4999)
* Add support for modules

* Use "" for inclusion

* Fix missing includes on Poco.Data module

* Add PDF and SevenZip modules, and match modules to build macros

* Add CI test

* Add missing link libraries in CMake

* Add remaining libraries DNSSD, CppParser and CppUnit. Changed some static declarations to inline to export

* We also need to forward the ENABLE_NETSSL_* macros

* Update CMakeLists files

* Add samples as requested, with DateTime and URI test for example

* Fix POCO_MODULES_INSTALL macro

* chore(CMake): Combine install macro for libraries and C++ modules into one macro.

* Apply testsuite changes and address include directories concerns

* Restore accidentally deleted build files

* Mistakenly added a file generated by CMake, removed.

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2025-09-19 19:46:36 +02:00