854 Commits

Author SHA1 Message Date
Aleksandar Fabijanic
6d602ea6b3 5150 reactor sock remove (#5151)
* fix(NotificationCenter): use RWLock to prevent lock-order-inversion #5150

Change NotificationCenter from Mutex to RWLock to fix TSAN lock-order-inversion
warnings when notification handlers call back into the notification center
(e.g., hasEventHandler() from within a SocketReactor handler).

Key changes:
- Replace Mutex with RWLock for better read concurrency
- Use read locks for hasObserver(), observersToNotify(), hasObservers(),
  countObservers(), backlog()
- Use write locks for addObserver(), removeObserver(), clear()
- observersToNotify() now copies observer list and releases lock before
  calling accepts() to avoid lock cycle with NObserver's internal mutex
- Add clear() method to atomically disable and remove all observers
- Update AsyncNotificationCenter to use RWLock::ScopedLock

Also fixes AsyncNotificationCenter shutdown to properly signal the dequeue
thread via ShutdownNotification instead of relying only on wakeUpAll() #5058

* fix(Net): add SocketReactor::remove() for safe socket cleanup #5150

Add SocketReactor::remove() method that atomically removes a socket
from the poll set and disables all its event handlers. This prevents
race conditions when removing handlers in destructors, where events
could still be dispatched to handlers while other handlers for the
same socket are being removed.

Changes:
- Add SocketReactor::remove(socket) for atomic socket removal
- Add SocketNotifier::disableObservers() to disable all handlers
- Add SocketNotifier::socket() getter
- Skip dispatch for removed sockets in dispatch() methods
- Update tests to use remove() before removeEventHandler()
- Add testSocketReactorRemove() test

* fix(Foundation): improve ProcessRunner robustness #5054

- Fix race condition: set _pPH after _pid to ensure pid() returns
  valid value when running() returns true
- Add upfront invalid PID validation before termination attempt
- Escalate to Process::kill() if requestTermination times out,
  with its own timeout before throwing
- Try to remove stale PID file on timeout instead of throwing
- Wrap start() wait logic in try/catch to kill orphan process
  and reset state if startup fails
- Clear _error under lock after successful stop to prevent
  stale error from affecting next start()

* Update Net/include/Poco/Net/SocketReactor.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Foundation/src/AsyncNotificationCenter.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Foundation/include/Poco/AsyncNotificationCenter.h

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Foundation/src/AsyncNotificationCenter.cpp

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore: add TaskManager::testCancel to win ignore list

* chore: few improvements in NotificationCenter and ODBC cmake.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Matej Kenda <matejken@gmail.com>
2026-01-06 19:18:31 +01:00
Friedrich Wilckens
7f03ba5ba4 Modernize Poco::Util and clean up some code duplications (#5153)
* Util::Application: unified argument handling to reduce code duplication

* Syntax fix for Util::Application on Win32

* Util::Application: fix for _WIN32

* Explicitly delete and default constructors of Subsystem.

* Data::TypeHandler: suppress MSVC warning about implicitly deleted destructor

* Poco::Util: deleted/defaulted constructors, override annotations

* Application, ServerApplication: some cleanup

* Default member initializers for Util::Option

* Poco::Util: more deleted/defaulted constructors, override annotations

* Overload of AbstractConfiguration::keys() that returns the result

* Util::LocalConfigurationView as a variant of ConfigurationView

* Util::SystemConfiguration: use map of functions

* Util: update copyright notices

* Util::AbstractConfigurationView

* Poco::Util::Units::abs template

* Overloads for Application::getApplicationPath and getApplicationDirectory

* Potential fix for code scanning alert no. 1696: No raw arrays in interfaces

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Potential fix for code scanning alert no. 1697: Commented-out code

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Documentation fix for AbstractConfiguration

* More fixes for code scanning alert no. 1696: No raw arrays in interfaces

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-01-06 18:26:20 +01:00
Aleksandar Fabijanic
bd09152aff feat(ODBC): nix shells for mssql and oracle #5144 (#5145)
* feat(ODBC): nix shells for mssql and oracle #5144

* fix(cmake): not using cppignore #5146

* fix(Data/ODBC): Improve Nix CI container startup and debugging

Oracle (oracle.nix):
- Add --shm-size=1g for Oracle container (requires 1GB shared memory)
- Add container state verification before exec commands
- Add proper error handling with container log output on failure
- Add pre-flight checks in build_and_test to verify container running
- Add Podman environment info for CI debugging
- Add progress indicators during Oracle startup wait
- Exit with error in CI mode if container fails to start

MSSQL (mssql.nix):
- Add ODBCINSTINI environment variable
- Add sync command to flush ODBC configs to disk
- Add odbcinst verification commands

Temporarily disable all ci except nix #5144

* try newer oracle version

* use ubuntu 24.04 for nix ci (podman related)

* chore(c): restore ci.yml

* Update Data/ODBC/oracle.nix

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Data/ODBC/oracle.nix

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Data/ODBC/mssql.nix

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update Data/ODBC/oracle.nix

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(odbc): verify oracle downloads #5144

* chore(doc): update nix documentation #5144

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-05 05:13:58 +01:00
Aleksandar Fabijanic
ebec641893 fix(VarHolder): Date/Time diagnostics not implemented #5142 (#5143) 2025-12-28 03:22:13 +01:00
Aleksandar Fabijanic
0e1ba0b780 fix(Data): Refactor ODBC tests and fix testReconnect TypeInfo caching… (#5140)
* fix(Data): Refactor ODBC tests and fix testReconnect TypeInfo caching #5136

- Add TypeInfo::reset() to clear cached type info, called on session close
  to fix testReconnect failing when connection is reestablished
- Move common test methods from ODBC SQLExecutor to shared DataTest
  SQLExecutor for better code reuse across database backends
- Improve error message in hasTransactionIsolation() to be more descriptive
- Refactor ODBC MySQL and PostgreSQL test executors to delegate to
  shared base implementation
- Update MySQL, PostgreSQL, and SQLite test suites to use refactored
  executor methods
- Add Nix shell environments for MySQL and PostgreSQL test databases
  with auto-start/stop and ODBC driver configuration

* chore: pass executor name

* chore: nix-shell documentation

* chore: nix-shell documentation

* feat: add optional/tuple tests to ODBC Oracle and SQLServer #5136

* fix(ODBC): add missing functions implementations #5136
2025-12-24 14:42:24 +01:00
Matej Kenda
38eb412c9c fix: Move bundled dependency symlinks to library-specific .gitignore files #5048 2025-12-23 18:52:31 +01:00
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
Aleksandar Fabijanic
1850dc16aa Benchmark and FastLogger (#5081)
* 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: .gitignore symlinks; XML Makefile wrong pattern

* Optimize PatternFormatter and Timezone performance #5078

PatternFormatter:
- Cache node name (Environment::nodeName()) to avoid repeated syscalls
- Add extractBasename() for efficient %O format specifier
- Add string reserve(128) to reduce reallocations during formatting

Timezone:
- Cache UTC offset to avoid repeated syscalls (8x speedup for %L patterns)
- Auto-detect TZ environment variable changes to invalidate cache
- Add reloadCache() method for explicit cache refresh

Tests:
- Add TimezoneTest::testUtcOffsetCaching()
- Add PatternFormatterTest::testExtractBasename()

* fix: use Path::separatorin extractBasename #5078

* Add Benchmark #5080

* enh(Logging): move constructors for Message and Logger #5078

* chore(AsyncNotificationCenter): eliminate MSVC warnings

* enh(build): c++20 support #5084

* feat(CppUnit): print class name
execute all named tests (not only the first one)
accept test name with class (eg. testrunner LoggerTest::testLogger) #5083

* feat(Benchmark): Add Logger/FastLogger comparison benchmarks and Windows support

- Add LoggerBench.cpp with AsyncChannel vs FastLogger benchmarks
- Add compare.sh (Linux/macOS) and compare.ps1 (Windows) scripts
- Add LOGGER_BENCHMARK.md with cross-platform benchmark results
- Update README.md with Windows build instructions (Ninja, CMAKE_PREFIX_PATH)
- Add error message when -- options are used on Windows (should use /)
- Update CMakeLists.txt and Makefile to include LoggerBench #5080

* feat(FastLogger): #5078
FastLogger provides a Poco-compatible wrapper around the Quill logging
library, offering significant performance improvements over AsyncChannel
through lock-free SPSC queues and backend thread processing.

Key features:
- Drop-in replacement for Poco::Logger with FastLogger::get()
- Support for all standard Poco channels (Console, File, Rotating, etc.)
- XML/properties configuration via FastLoggerConfigurator
- Thread affinity for backend worker on Linux and Windows
- Log file rotation with size and time-based policies

Performance (CPU time - calling thread latency):
- Linux: 31-70x faster than AsyncChannel
- Windows: 23-87x faster than AsyncChannel
- macOS: Limited improvement due to lack of thread affinity support

New files:
- Foundation/include/Poco/FastLogger.h
- Foundation/src/FastLogger.cpp
- Util/include/Poco/Util/FastLoggerConfigurator.h
- Util/src/FastLoggerConfigurator.cpp
- dependencies/quill/ (header-only Quill 7.5.0 library)

* fix(cmake): disable FastLogger on emscripten (not supported) #5078

* feat(FastLogger): add cpuAfinity config parameter #5087

* fix(FastLogger): Fix lock-order-inversion in FastLogger (TSAN) #5078

* fix(cmake): build not stripping release binaries #5085

* fix(PCRE): fails to compile with clang/c++20 #5131

* feat(AsyncChannel): add CPU affinity property #5087

* feat(SpinlockMutex): make it adaptive #5132

* feat(AsyncChannel): add CPU affinity property #5087

* chore: remove leftover file commited by mistake

* feat(build): allow FastLogger to be fully disabled at build time #5078

Build system changes:
- Add POCO_NO_FASTLOGGER compile definition in CMake when ENABLE_FASTLOGGER=OFF
  to prevent Config.h from auto-enabling FastLogger
- Add ifdef guards around FastLogger tests in LoggingTestSuite.cpp
- Exclude FastLoggerTest.cpp and FastLoggerChannelsTest.cpp from CMake build
  when FastLogger is disabled
- Add POCO_NO_FASTLOGGER support to Make build system for Foundation and Util
- Add CI jobs to verify builds work without FastLogger (CMake and Make)

Code changes:
- Add LoggingConfigurator::configure() convenience method for quick logging setup

* fix(ci): testrunner args

* chore(progen): remove leftover script #5076

* fix(test): give ANC a bit more time to process

* fix(ci): set env before test run

* chore(doc): quill license

* feat(Channel): add log(Message&&) #5133

* fix(ci): set env before test run

* fix(TestRunner): don't search children #5083

* feat: lock-free queues #5134

* feat(Benchmark): various comparisons

* chore: cleanup benchmark
2025-12-22 21:06:43 +01:00
Matej Kenda
1461ec618b fix: Resolve compiler warnings and fix potential bugs (#5130) 2025-12-22 15:27:11 +01:00
Alex Fabijanic
de3d46a2f3 fix(SQLite): Adapt makefiles for external dependencies #5048 2025-12-20 12:23:11 -06:00
Alex Fabijanic
3d71183702 fix(SQLite): Remove redundant error messages #5115 2025-12-20 12:21:18 -06:00
Matej Kenda
8410eb1a6f fix(Foundation): Reject trailing garbage in DateTimeParser (#5030) (#5117) 2025-12-18 16:38:20 +01:00
Matej Kenda
bce1c89ae0 fix(Data/PostgreSQL): Map UUIDOID to FDT_UUID instead of FDT_BLOB (#4924) 2025-12-18 10:59:11 +01:00
Matej Kenda
7a03cafbb3 fix(Data): Add using AbstractBinder::bind to prevent hidden virtual warning (#4900) 2025-12-18 10:53:24 +01:00
Matej Kenda
7addcfbc81 fix: Resolve compiler warnings across multiple modules 2025-12-17 18:06:59 +01:00
Matej Kenda
227f84fb8b fix(Net): Add POCO_HAS_UNIX_SOCKET guards to fix build without Unix sockets #5064 2025-12-16 06:50:21 +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
Marian Krivoš
872727f6db fix(Data/PostgreSQL): PostgreSQL reconnect() doesn't restore session state correctly (#5025) (#5027) 2025-12-06 01:38:13 +01:00
cliu
2bdeaff849 fix(data/odbc): change the preparing of uuid column type so that isNull() can properly get the actual size and check if it is null. 2025-11-27 10:28:41 +01:00
Aleksandar Fabijanic
c775d5f3b7 feat(AsyncNotificationCenter): Auto-configure number of workers #5060 (#5061)
* feat(AsyncNotificationCenter): Auto-configure number of workers #5060
add/removeObserver utility functions
move AsyncNotificationCenter tests into a separate file
tests

* chore: update copyrighht
2025-11-13 08:36:07 +01:00
Matej Kenda
8a4a2955d5 Use nullptr in C++ code (solves #4348) (#5043)
* chore(CppParser): 0, NULL --> nullptr

* chore(Crypto): 0, NULL --> nullptr

* chore(DNSSD): 0, NULL --> nullptr

* chore(Encodings): 0, NULL --> nullptr

* chore(CppUnit): Correct indentation.

* chore(Foundation): 0, NULL --> nullptr

* chore(CMake): Always warn about wrong nullptr usage when compiling with GCC or CLang

* chore(Net): 0, NULL --> nullptr

* chore(Foundation): 0, NULL --> nullptr

* chore(Data): 0, NULL --> nullptr

* chore(macOS): 0, NULL --> nullptr

* chore(XML): 0, NULL --> nullptr

* chore(Zip): 0, NULL --> nullptr

* chore(Util): 0, NULL --> nullptr

* chore(Net/NetSSL): 0, NULL --> nullptr

* chore(Bonjour): 0, NULL --> nullptr

* chore(MongoDB, Redis): 0, NULL --> nullptr

* chore(Poco): 0, NULL --> nullptr

* chore(Win32): 0, NULL --> nullptr

* chore(CMake): Only warn about nullptr when verbose warnings are enabled.

* Potential fix for code scanning alert no. 1634: Guarded Free

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* chore(Net): Fix warning reported by gitlab.

* chore(gitlab CI): attempt to clean to gain disk space on the runner.

* chore(gitlab CI): Run build with  --parallel 4, correct docker cleanup.

---------

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-10-30 15:20:53 +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
Matej Kenda
7a23a039f9 Reorganise external libs to separate subdirectory (#4996)
* chore(PCRE): properly detect library type on newer macOS

* chore(ZLIB): move source files to own zlib directory and update CMake files.

* chore(PCRE): move source files to own pcre2 directory and update CMake files.

* chore(UTF8PROC): move source files to own utf8proc directory and update CMake files.

* chore(ZLIB): remove header files

* chore(PDJSON): move source files to own pdjson directory and update CMake files.

* chore(SQLite3): move source files to own sqlite3 directory and update CMake files.

* chore(UNBUNDLED): Correct includes.

* chore(expat): move source files to own expat directory and update CMake files.

* chore(wepoll): move source files to own wepoll directory and update CMake files.

* chore(7zip): move source files to own 7zip directory and update CMake files.

* chore(CMake): fix compile and link flags for dependent static libraries

* chore(CMake): set PCRE2_STATIC when building PCRE2.

* chore(SQLite3): Set SQLITE_THREADSAFE for unbundled build, add warnings.

* chore(CMake): Modifications to build and link properly static target libraries (using OBJECT library type and link using BUILD_LOCAL_INTERFACE)

* chore(CMake): fix order of includes in main CMakeLists.txt.

* chore(CI): Build mysql tests with cmake.

* chore(CI): Build mongodb, redis, sqlite no parser tests with cmake.

* chore(CI): Build odbc tests with cmake.

* chore(CI): Build more ations with cmake, other fixes.

* chore(CI): Fixes for macOS

* chore(CMake): extract hpdf and png files to own directories in dependencies

* fix(CMake): include dependencies after all module dependencies are resolved.

* fix(CMake): Improve dependency handling of dependencies to compile them only when necessary.

* fix(CMake): PDF: move t4.h to proper directory, modify include.

* fix(CMake): Fixes to link properly on all platforms.

* fix(CMAKE): Wrong ENABLE for SQLITE

* enh(PDF): Remove dependencies on hpdf headers from Poco::PDF interface and make usage of hpdf only internal.

* enh(CI): Convert more jobs to use cmake.

* enh(CI): Convert macOS sanitizer jobs to use cmake.

* enh(mkrelease): Copy dependencies when creating release package.

* eng(CMake): Add missing POCO_SO option to enable/disable small object optimization.

* enh(CI): Run linux sanitizer with cmake, various fixes and improvements.

* fix(CMake): bundled build: ZLIB::ZLIB is already linked with Foundation, no need to link again to Poco::Zip

* fix(CI): vptr undefined sanitizer causes foundation tests to fail when linking, disable it

* chore(tests): Minor code improvements.

* fix(AsyncNotificationCenter): fix a data race with member _listsEmpty by making it atomic.

* eng(CI): Add a few more time sensitive tests to cppignore.lnx

* chore(Thread): Code updates.

* eng(CI): Add a few more time sensitive tests to cppignore.lnx

* fix(AsyncNotificationCenter): must join threads to avoid data race in dtor.

* chore(CI): Pass TSAN_OPTIONS to jobs where necessary

* chore(CI): run rests without sudo, compile with parallelism

* chore(CI): Use POCO_MINIMAL_BUILD to simplify CMake configure lines.

* chore(CI): Add 32-bit Windows VS build

* chore(CMake): Printout cmake generator platform.

* chore(CMake): linux-gcc-make-armv7l -> linux-gcc-cmake-armv7l

* chore(ci): windows-2025-msvc-cmake-32bit -> windows-2025-msvc-cmake-Win32

* chore(CI): Convert all remaining jobs to CMake.

* chore(make): Prevent building with make.

* chore(CodeQL): exclude all external code from CodeQL checks.

* chore(macOS): Set min support version to 13.3 to properly support C++20 standard.
2025-09-11 17:11:29 +02:00
Matej Kenda
d16161322e chore(ODBC): Remove redundant code. 2025-09-11 10:25:40 +02:00
Matej Kenda
28467cdcca fix(Data Preparator): Handle UUID type properly in prepareImpl. (#5018) 2025-09-11 10:16:31 +02:00
Aleksandar Fabijanic
7add38041d fix(Data/ODBC): Oracle DB Integers #5002 (#5003) 2025-09-11 10:13:52 +02:00
Matej Kenda
e6f661d313 chore(deprecated): Describe deprecation reasons and alternatives. 2025-09-11 09:25:01 +02:00
Matej Kenda
317ce8aae8 CMake minimal build and dependencies (#5013) 2025-09-06 13:34:59 +02:00
Andrew Auclair
20c993b819 New SQLite Only Unbundled Option (#4983)
* New SQLite Only Unbundled Option

A new option to use an unbundled (external) SQLite but all other dependencies internal.

* Match Other Option Styles

Force the POCO_SQLITE_UNBUNDLED option to ON when POCO_UNBUNDLED is on. Switching to this style to match the rest of the Poco cmake options.
2025-08-12 08:47:20 +02:00
cliu
f43aec0cab fix(pr4979): add missing line of code into the entry of test suite 2025-08-08 22:55:53 +02:00
cliu
72dfce4239 feat(data): add implementation of bulkbinding uuid containers for odbc binder. 2025-08-08 22:55:53 +02:00
Matej Kenda
e8f4f3f445 chore (sources): Remove executable bit from source files. 2025-07-01 13:52:21 +02:00
Günter Obiltschnig
be2748de0f fix(Data): fix failing SessionPool test due to changes to SessionPool::dead() 2025-04-10 05:59:35 +02:00
Günter Obiltschnig
bb0b8f8e81 fix(Data): Poco::Data::SessionPool::dead() must check idle, not active, sessions #4923 2025-04-04 12:16:54 +02:00
Günter Obiltschnig
9ca3cf74ef chore(Data/SQLite): Upgrade bundled SQLite to 3.49.1 #4907 2025-03-24 06:48:33 +01:00
Matej Kenda
daf19e5223 fix(templates): Corrected explicit template instantiations to avoid multiple instances. 2025-01-14 15:09:30 +01:00
Lara Dzivdzanovic
4ca735d7d8 fix(Makefile): add missing parameter for enabling FTS5 #4832 (#4834) 2025-01-06 13:07:20 +01:00
peter15914
79888c0e06 fix(SQLParser): typo that leads to the use of freed memory 2025-01-05 12:53:53 +01:00
Günter Obiltschnig
8e023bbd45 chore: hide some declarations from PocoDoc/C++ parser 2024-12-01 11:26:34 +01:00
Matej Kenda
fc8a4fd702 upgrade(sqlite): bundled SQLite version 3.47.1 (released 2024-11-25) 2024-11-28 13:17:20 +01:00
Aleksandar Fabijanic
21f93e3e6a enh(ODBC): ODBC: DataFormatException getting Time value from SQL Server #3801 (#4777) 2024-11-20 16:22:53 +01:00
Matej Kenda
52959b91da DB logger sample (#4759)
* sample(DBLogger): New sample to demonstrate DB logging to a file. (#4750)

* sample(DBLogger): Create messages via SQL logger in a thread (#4750)

* sample(DBLogger): Save messages from SQL files to an SQL database (works with SQLite) (#4750)

* chore(Makefile): Data samples depend on PocoUtil (#4750)

* sample(DBLogger): Refactored DBLogger with std::filesystem::directory_iterator and std::thread.

* sample(DBLogger): Add missing include <condition_variable>

* sample(DBLogger): Extracted log scanning and inserting functionality to class SQLLogInserter.

* sample(DBLogger): Create new logging table only when using demo messages option.

* feat(DBLogger): VS projects

* sample(DBLogger): Acquire options from configuration file.

* feat(DBLogger): regenerate VS projects (progen file change)

* sample(DBLogger): Add example DBLogger.properties file.

* sample(DBLogger): Process as much as possible when stopping processing.

* sample(DBLogger): Meaningful defaults in properties file.

* sample(DBLogger): Verify validity of database session on startup.

* sample(DBLogger): Configure demo SQL channel in properties file.

* chore(DBLogger): style and warnings

---------

Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com>
Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2024-11-18 17:06:20 +01:00
Alex Fabijanic
db9ba69f7d fix(Data): warning: 'isNull' overrides a member function but is not marked 'override' #4768 2024-11-13 18:35:00 -06:00
Aleksandar Fabijanic
9530a77347 Insert NULL using BULK #4001 (#4755)
* fix(ODBC): Insert NULL using BULK #4001
resolve bound types and sizes at compile time

* fix: remove string suffix for static_assert

* Insert NULL using BULK #4001

* fix: typo

* fix(SQLite): missing functions; consolidate extract calls

* chore(SQLite): remove unnecessary typedef

* fix(SQLite): remove duplicate functions

* fix(SQLite): compile errors and warnings

* fix(SQLite): extract implementation signatures

* fix(SQLite): long64 platforms compile errors

* fix(SQLite): long64 platforms compile errors, part ii

* fix(ODBC): windows build

* fix(ODBC): MSSQL big string on windows

* fix(Data): psql and mysql compile errors

* fix(PostgreSQL): add missing functions

* fix(ODBC): revert column size discovery (breaks Oracle)

* fix(PostgreSQL): Nullable extraction #4001

* fix(MySQL): Nullable extraction #4001

* chore(Data): code tidy up

* fix(ODBC): add missing changes
2024-11-11 18:23:21 +01:00
Lara Dzivdzanovic
fe9c13102d feat(PocoDoc): search support (#4494)
* feat(PocoDoc): search support

* feat(PocoDoc): enable FTS5 for search support

* feat(PocoDoc): enable FTS5

* chore(pocodoc): edit comment

* fix(StreamCopier): add argument to seekg

* enable searchIndex through the command line

* Add minor updates for search support

* Update of vs90 and regeneration of vs160 and vs170 projects

* Enhance configure script:FTS5 support for SQLite in --sqlite-fts flag

* Add tests for FTS3 and FTS5

* regeneration of vs160 and vs170 projects

* added missing lib data in CMake

* Update vs90 project and regenerate vs160 and vs170 projects with added Data include paths

* Revrting ProGen_vs170.vcxproj

* Revert ProGen in vs170 and regenerate PocoDoc vs160/vs170 projects to include updated Data path

* added missing includes

---------

Co-authored-by: Lara <lara@debian-gnu-linux-12.localdomain>
2024-11-11 16:53:05 +01:00
Matej Kenda
7df5ec45b8 fix(Data::ODBC): use connection and login timeouts in ODBC session implementation (#4721)
* fix(Data::ODBC): use connection and login timeouts in ODBC session implementation (#4366)

* fix(Data::ODBC): use only connection timeout in ODBC session implementation (#4366)

* fix(ODBC): consolidate login timeout; create temp directory if it doesn't exist #4366

---------

Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2024-10-30 16:52:45 +01:00
Aleksandar Fabijanic
36c808230c fix(ODBC): Poco:Data::ODBC - MSSQL (n)varchar(max) length issue #4324 (#4738)
* fix(ODBC): Poco:Data::ODBC - MSSQL (n)varchar(max) length issue #4324

* chore(ODBC): remove unused vars; fix SQL Server SDK include path #4324

* fix(ODBC): trim UTF16 string #4324

* chore(ODBC): add compile time big string diagnostics #4324

* chore(ODBC): add SQLServer big string vector test case #4324

* fix(ODBC): detect SQLServer header #4324

* chore: add listing msodbdcsql18 folder #4324

* ci: change odbc drivers installation order #4324

* chore(CMake): Add option ENABLE_DATA_SQL_SERVER_BIG_STRINGS, auto-detection of msodbcsql.h on Linux and macOS

* fix(ODBC): detect backend at runtime for string size; add Session::dbmsName() #4324

* fix(ODBC): wrong char to string conversion #4324

---------

Co-authored-by: cunj123 <n.belusic@pta.hr>
Co-authored-by: Matej Kenda <matejken@gmail.com>
2024-10-19 21:43:00 +02:00
Aleksandar Fabijanic
9a97e7ca0d fix(Data): RecordSet issue since 1.10.0 (#4739)
* fix(Data): RecordSet issue since 1.10.0

* fix(RecordSet): copy, move #4525
2024-10-17 01:39:31 +02:00
Matej Kenda
6f34ec89ce fix(cmake): increase minimum version to 3.15, fix Data::PostgreSQL include target, remove unnecessary cmake modules that are provided with CMake itself (#4540) 2024-10-16 12:09:24 +02:00
Aleksandar Fabijanic
8e958f685f 2808 data nullable (#4729)
* chore(CppUnit): disable MSVC secure warning

* chore(Data): regenerate VS projects

* chore(DataTest): regenerate VS projects

* chore(Data/testsuite): regenerate VS projects

* chore(DataTest): fix VS90 project

* fix(ODBC): Failed to insert Poco::Nullable< Poco::Data::Date> data into MSSQL using ODBC #2808

* chore(Foundation): add Trace to VS project

* chore(Trace): add Trace VS projects #4692

* fix: g++ and clang build #2808
2024-10-12 20:42:39 +02:00