Commit Graph

816 Commits

Author SHA1 Message Date
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
Matej Kenda
c038b52f36 chore(Poco): Resolve a lot of warnings, reported by g++ 13. 2024-10-10 10:41:24 +02:00
Aleksandar Fabijanic
88c4958032
Serializable Isolation level for SQLite Databases (#4693)
* fix #4536
I've add transaction isolation support for SQLite
Warning! SQLite transactions are [serializable by design](https://
www.sqlite.org/isolation.html) but my implementation retuns false in
function hasTransactionIsolation and throw an exception in
setTransactionIsolation

* disable shared cache in TearDown()

* chore(doc): reword documentation

* we should waitresult of select before rollback (#4718)

---------

Co-authored-by: Alexander B <ale.bychuk@gmail.com>
2024-10-10 10:41:02 +02:00
Aleksandar Fabijanic
eaabd3ff8d
Stack trace (#4691)
* chore(Trace): add dev env settings

* add(Trace): init add Poco::trace and libbacktrace files

* feat(Exception): generate stack trace if enabled at compile time

* chore(DNSSD): remove binaries from git

* fix(Trace): build

* chore(ci): exclude exception text tests for trace build; add debug test script params

* chore(build): mac (dl)

* chore(cmake): Changes to build Trace with CMake.

* chore(cmake): Changes to build Trace on Windows

* chore(cmake): Improvements to include trace sample.

* chore(cmake): Fixes to properly build/link Trace on Linux

* chore(cmake): add_definitions --> add_compile_definitions

* chore(cmake): Build Trace as static and don't export it.

* chore(make): Link Trace with built-in libbacktrace on Linux

* chore(Trace): remove unnecessary sources for libbacktrace.

* chore(github): enable trace on a few github checks

* chore(cmake): Build Trace with clang++ on Linux.

* chore(cmake): Properly set POCO_ENABLE_TRACE globally when needed.

* fix(cmake): Trace: corrected include for clang on Linux

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2024-10-10 10:36:13 +02:00
Matej Kenda
a1efeaa72d
GitHub runner ubuntu 24.04 and resolve some issues (#4727) 2024-10-09 21:53:49 +02:00
Marco Rebhan
3b79a51722 Explicitly define conditional LOB constructors for const (w)string &
This fixes compilation against libcxx 19, which removed the
non-standard specializations for std::char_traits including the one
for unsigned char, which would get instantiated for BLOB.
See https://reviews.llvm.org/D138307 and
https://reviews.llvm.org/D157058.

Closes #4722.
2024-10-07 13:59:19 +02:00
Matej Kenda
e55bb7032d enh(Nullable, Optional): reimplement using std::optional (#4502) 2024-09-25 08:18:35 +02:00
Sergei Trofimovich
03c35cff93 SimpleRowFormatter.h: fix the build on gcc-15 (unsatisfied noexcept)
On today's `gcc-15` poco fails to build as:

    In file included from /build/source/Data/include/Poco/Data/Statement.h:27,
                     from /build/source/Data/include/Poco/Data/Session.h:23,
                     from /build/source/Data/include/Poco/Data/ArchiveStrategy.h:22,
                     from /build/source/Data/src/ArchiveStrategy.cpp:15:
    /build/source/Data/include/Poco/Data/SimpleRowFormatter.h:114:21: error: declaration of 'std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_construc
    tible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) noexcept [with _Tp = Poco::Data::SimpleRowFormatter; _Require<__not_<__is_tuple_like<_Tp> >, is_move_constructible<_Tp>, is_move_assignable<_Tp> > = void]' has a different exception specifier
      114 |         inline void swap<Poco::Data::SimpleRowFormatter>(Poco::Data::SimpleRowFormatter& s1,
          |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    In file included from /nix/store/...-gcc-15.0.0/include/c++/15.0.0/bits/new_allocator.h:36,
                     from /nix/store/...-gcc-15.0.0/include/c++/15.0.0/x86_64-unknown-linux-gnu/bits/c++allocator.h:33,
                     from /nix/store/...-gcc-15.0.0/include/c++/15.0.0/bits/allocator.h:46,
                     from /nix/store/...-gcc-15.0.0/include/c++/15.0.0/string:43,
                     from /build/source/Foundation/include/Poco/Foundation.h:94,
                     from /build/source/Data/include/Poco/Data/Data.h:23,
                     from /build/source/Data/include/Poco/Data/ArchiveStrategy.h:21:
    /nix/store/...-gcc-15.0.0/include/c++/15.0.0/bits/move.h:214:5: note: from previous declaration 'std::_Require<std::__not_<std::__is_tuple_like<_Tp> >, std::is_move_constructible<_Tp>, std::is_move_assignable<_Tp> > std::swap(_Tp&, _Tp&) noexcept (false) [with _Tp = Poco::Data::SimpleRowFormatter; _Require<__not_<__is_tuple_like<_Tp> >, is_move_constructible<_Tp>, is_move_assignable<_Tp> > = void]'
      214 |     swap(_Tp& __a, _Tp& __b)
          |     ^~~~

Possibly because `SimpleRowFormatter` does not have constructors and
assignment operators that involve rvalue references?

Updated `noexcept` condition. Fixes the build on` gcc-15`. Still
compiles on `gcc-13`.
2024-09-20 19:27:33 +02:00
Matej Kenda
f20bbab5c8 update(SQLite): Version 3.46.1 2024-09-12 08:17:35 +02:00
Matej Kenda
1eebd46c04
Cppunit and data test enhancements (#4616)
* enh(CppUnit): Source code enhancements.

* enh(DataTest): Code enhancements (mostly to use override) to prevent wrong test calls when renaming.
2024-07-30 15:09:58 +02:00
Matej Kenda
f24547cdcf enh(Poco): Mark deprecated functionality with C++ attributes and resolve internal usage of deprecated functions (#4551)
* enh(poco): Replace deprecated comments with C++ deprecated attribute.

* enh(Poco): Replace some deprecated functionality in Poco sources. (#4426)

* enh(Poco): Replace more deprecated functionality in Poco sources. (#4426)

* fix(CMake): Variable BUILD_SHARED_LIBS must be defined properly to create valid binaries.

* enh: Code improvements done while resolving deprecated functionality (#4426)

* Un-deprecate LocalDateTme (#4426)

* enh(Poco): Replace usage of deprecated functionality with other functions/classes (#4426)

* chore(SSL): temporarily un-deprecate SSL-related functionality (#4426)

* chore(SSL): temporarily un-deprecate old MongoDB protocol functionality (#4426)

* enh(Poco): Minor Hash improvements (#4426)

* enh(Foundation): Compile deprecated hash tests only when POCO_TEST_DEPRECATED is enabled (#4426)

* enh(Net): Compile deprecated Socket::select functionality only when POCO_TEST_DEPRECATED is enabled (#4426)

* enh(Bonjour): Replace deprecated Socket::select with PollSet (#4426)

* enh(Poco): Introduce POCO_DEPRECATED macro to have the ability to disable deprecation warnings in applications (#4426)

* test(ODBC): add few asserts to testStoredProcedureDynamicVar

* fix(ODBC): rename DynamicAny -> DynamicVar in tests

* fix(ODBC): make Dignostics static members inline to prevent explicit instantiation warnings on windows

---------

Co-authored-by: Alex Fabijanic <alex@pocoproject.org>
2024-07-29 08:37:35 +02:00
Aleksandar Fabijanic
7064ae3c2d
4368 fix oracle failing odbc tests (#4611)
* chore(CI): enable oracle ODBC tests #4368

* fix(ODBC): Oracle AutoTransaction test case; add explicit ODBC exceptions instantiation #4368

* fix(odbc): oracle test table creation error detection #4368

* enh(Data): enforce sql parsing for transaction tests to avoid select-only transactions #4368

---------

Co-authored-by: cunj123 <n.belusic@pta.hr>
2024-07-24 13:05:08 +02:00
Aleksandar Fabijanic
ed181d99dc
4529 sql logger shutdown (#4530)
* enh(ThreadTest): add join test

* enh(SQLLogger): #4529 (wip)

* enh(SQLChannel): just few C++17 modernisations.

* enh(SQLiteTest): extend unit test to destroy SQL channel while it has pending messages. (#4529)

* enh(ODBC): improve exception descriptions and add string/batch size tests

* feat(SQLChannel): add store-and-forward mode

* fix(DataTest): SQLChannel *nix build and test run #4529

* fix(DataTest): CodeQL warning #4529

* chore(ODBCTest): lower the number of max statements in big batch

* feat(SQLChannel): add flush property #4529

* enh(SQLChannel): use event for interruptible sleep; reduce code duplication with lambda; update comments #4529

* fix(SQLChannel): flush time determination #4529

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
2024-07-16 20:03:32 +02:00
Günter Obiltschnig
c8bb5b8cac chore(build): re-generated VS project files 2024-04-03 12:33:13 +02:00
Günter Obiltschnig
cd22900a37 enh(build): vcpkg support, cleanup/consistency 2024-04-03 09:20:14 +02:00
Günter Obiltschnig
04ef2698b1 chore(build): vcpkg dependencies 2024-04-03 08:42:20 +02:00
Günter Obiltschnig
a4c7fc6d03 fix(Data/MySQL): preserve backwards-compatibility with pre 8.3 2024-03-29 11:36:42 +01:00
Günter Obiltschnig
24cd658021 chore(Data/SQLite): Upgrade bundled SQLite to 3.45.2 #4515 2024-03-29 09:18:22 +01:00
Günter Obiltschnig
fa8dd55c8c fix(Data/MySQL): replace deprecated mysql_stmt_bind_param() with mysql_stmt_bind_named_param() 2024-03-29 08:26:38 +01:00
Aleksandar Fabijanic
480f992aa4 fix(ODBC): Unicode wrappers do not check for null length pointers #4505 2024-03-21 14:03:23 -05:00
Günter Obiltschnig
37e17092ff chore: fix vs project files 2024-02-19 22:29:26 +01:00
Günter Obiltschnig
369c0fc23d fix(Data): dependencies 2024-02-19 15:15:48 +01:00
Günter Obiltschnig
4b782b0958 chore(Data): add dependencies to DataTest 2024-02-19 15:15:48 +01:00
Aleksandar Fabijanic
a7020dc0e7 fix(DataTest): fix paths and regenerate VS projects 2024-02-19 15:15:48 +01:00
Alex Fabijanic
640600c147 fix(DataTest): move to Data directory 2024-02-19 15:15:48 +01:00
Günter Obiltschnig
3f1b1c8ee8 dependencies, DataTest 2024-02-19 15:15:48 +01:00
Friedrich Wilckens
a64e6cf2f6 Fixed transaction handling in MySQL test when SQL parser is switched off 2024-02-16 01:00:05 +01:00
Alex Fabijanic
137cd32183 fix(test): Disable SQL parsing by default #4462 2024-02-16 00:59:45 +01:00
Alex Fabijanic
2fe694e4d3 fix(SQLParser): Disable SQL parsing by default #4462 2024-02-16 00:59:31 +01:00
Alex Fabijanic
1a29ecde02 fix(SQLParser): remove fwd header #4453 2024-02-14 10:21:06 +01:00
Alex Fabijanic
e622b51d6b fix(SQLParser): remove leftover unnecessary includes 2024-02-14 09:53:52 +01:00
Aleksandar Fabijanic
499a7d35f9 fix(build): regenerate VS projects #4453 2024-02-14 00:25:14 +01:00
Alex Fabijanic
c990b9f890 fix(build): Data libs CMakeLists #4453 2024-02-14 00:24:57 +01:00
Alex Fabijanic
b82fca8337 fix(build): ODBC Makefile and Data libs CmakeLists #4453 2024-02-14 00:24:39 +01:00
Matej Kenda
0088334536 fix(Data): Make SQLParser internal 2024-02-14 00:24:19 +01:00
Alex Fabijanic
ee39b611f2 fix(SQLParser): move to Data dir; add extradirs, remove vs 140,150 build scripts generation 2024-02-14 00:23:38 +01:00
Aleksandar Fabijanic
5bdbab6c5c
enh(SQLite): SQLite FTS5 #4367 (#4433) 2024-02-01 09:53:06 +01:00
Aleksandar Fabijanic
c7d16b2a7e
4368 oracle odbc tests (#4410)
* feat(format): Add string_view format type spec #4409

* chore(Types): add demangle

* fix(Data): Oracle failing ODBC tests #4368

* fix some CQL and fuzz warnings; add Var::typeName()

* fix(build): -std=c++17 and c11

* fix windows build

* fix(Foundation): test apps vs projects c++17

* chore(build): remove uneeded compiler flag

* fix(VarHolder): number of digits range check for int->float conversion (reported by CIFuzz)

* fix(test): CIFuzz

* fix(CIFuzz): another attempt

* fix(progen): add LanguageStandard (stdcpp17, stdc11); regenerate vs170 projects

* fix(CiFuzz): add int->float precision loss barrier; fix erroneous number of digits logic

* enh(Var): silent loss of precision on int->float conversion #4423

* enh(Var): silent loss of precision on int->float conversion #4423

* chore(build): remove old build files

* chore: fix missing parens warning

* enh(Thread_POSIX): prevent double-joining; add error description to exceptions

* fix(Data): unresolved Column<long> linkage in test

* fix(demangle): determine type name from template parameter; add eror diagnostic for demangling failures

* chore(buildwin): remove old vs versions from build and progen scripts; update documentation

* chore(buildwin): remove leftover closing curly
2024-01-31 22:07:07 +01:00
Günter Obiltschnig
d5a5ebc2d7 enh: #3890: Get rid of SingletonHolder 2024-01-30 09:56:27 +01:00