diff --git a/CMakeLists.txt b/CMakeLists.txt
index 718e16cd8..861c27c56 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -329,6 +329,8 @@ if(ENABLE_POCODOC)
set(ENABLE_UTIL ON CACHE BOOL "Enable Util" FORCE)
set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
set(ENABLE_CPPPARSER ON CACHE BOOL "Enable C++ parser" FORCE)
+ set(ENABLE_DATA ON CACHE BOOL "Enable Data" FORCE)
+ set(ENABLE_DATA_SQLITE ON CACHE BOOL "Enable Data SQLite" FORCE)
endif()
if(ENABLE_UTIL AND ENABLE_TESTS)
diff --git a/Data/SQLite/SQLite.progen b/Data/SQLite/SQLite.progen
index eed02321f..219006c18 100644
--- a/Data/SQLite/SQLite.progen
+++ b/Data/SQLite/SQLite.progen
@@ -8,7 +8,7 @@ vc.project.platforms = Win32
vc.project.configurations = debug_shared, release_shared, debug_static_mt, release_static_mt, debug_static_md, release_static_md
vc.project.prototype = ${vc.project.name}_vs90.vcproj
vc.project.compiler.include = ..\\..\\Foundation\\include;..\\..\\Data\\include
-vc.project.compiler.defines = SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED
+vc.project.compiler.defines = SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED
vc.project.compiler.defines.shared = ${vc.project.name}_EXPORTS
vc.project.compiler.defines.debug_shared = ${vc.project.compiler.defines.shared}
vc.project.compiler.defines.release_shared = ${vc.project.compiler.defines.shared}
diff --git a/Data/SQLite/SQLite_vs160.vcxproj b/Data/SQLite/SQLite_vs160.vcxproj
index 003ebb665..621eb2f92 100644
--- a/Data/SQLite/SQLite_vs160.vcxproj
+++ b/Data/SQLite/SQLite_vs160.vcxproj
@@ -1,4 +1,4 @@
-
+
@@ -57,108 +57,108 @@
SQLite
Win32Proj
-
+
StaticLibrary
MultiByte
- v142
+ v143
StaticLibrary
MultiByte
- v142
+ v143
StaticLibrary
MultiByte
- v142
+ v143
StaticLibrary
MultiByte
- v142
+ v143
DynamicLibrary
MultiByte
- v142
+ v143
DynamicLibrary
MultiByte
- v142
+ v143
StaticLibrary
MultiByte
- v142
+ v143
StaticLibrary
MultiByte
- v142
+ v143
StaticLibrary
MultiByte
- v142
+ v143
StaticLibrary
MultiByte
- v142
+ v143
DynamicLibrary
MultiByte
- v142
+ v143
DynamicLibrary
MultiByte
- v142
+ v143
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- <_ProjectFileVersion>17.0.34714.143
+ <_ProjectFileVersion>17.0.35327.3
PocoDataSQLited
PocoDataSQLitemdd
PocoDataSQLitemtd
@@ -228,7 +228,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebugDLL
@@ -236,7 +236,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -266,16 +266,16 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
true
MultiThreadedDLL
false
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
4996;4244;4018;%(DisableSpecificWarnings)
@@ -288,7 +288,7 @@
..\..\bin\PocoDataSQLite.dll
true
false
- ..\..\lib;%(AdditionalLibraryDirectories)
+ ..\..\cmakebuild\lib;%(AdditionalLibraryDirectories)
Console
true
true
@@ -300,7 +300,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebug
@@ -308,7 +308,7 @@
true
true
true
-
+
$(OutDir)$(TargetName).pdb
Level3
ProgramDatabase
@@ -331,16 +331,16 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
MultiThreaded
false
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
4996;4244;4018;%(DisableSpecificWarnings)
@@ -357,7 +357,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebugDLL
@@ -365,7 +365,7 @@
true
true
true
-
+
$(OutDir)$(TargetName).pdb
Level3
ProgramDatabase
@@ -388,17 +388,17 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
MultiThreadedDLL
false
true
true
true
-
+
$(OutDir)$(TargetName).pdb
Level3
-
+
Default
4996;4244;4018;%(DisableSpecificWarnings)
/Zc:__cplusplus %(AdditionalOptions)
@@ -414,7 +414,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebugDLL
@@ -422,7 +422,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -452,16 +452,16 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
true
MultiThreadedDLL
false
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
4996;4244;4018;%(DisableSpecificWarnings)
@@ -486,7 +486,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebug
@@ -494,7 +494,7 @@
true
true
true
-
+
$(OutDir)$(TargetName).pdb
Level3
ProgramDatabase
@@ -517,16 +517,16 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
MultiThreaded
false
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
4996;4244;4018;%(DisableSpecificWarnings)
@@ -543,7 +543,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebugDLL
@@ -551,7 +551,7 @@
true
true
true
-
+
$(OutDir)$(TargetName).pdb
Level3
ProgramDatabase
@@ -574,16 +574,16 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
MultiThreadedDLL
false
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
4996;4244;4018;%(DisableSpecificWarnings)
@@ -597,16 +597,16 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -667,6 +667,6 @@
true
-
-
-
+
+
+
\ No newline at end of file
diff --git a/Data/SQLite/SQLite_vs160.vcxproj.filters b/Data/SQLite/SQLite_vs160.vcxproj.filters
index 9d68ba51f..90c46fed6 100644
--- a/Data/SQLite/SQLite_vs160.vcxproj.filters
+++ b/Data/SQLite/SQLite_vs160.vcxproj.filters
@@ -2,22 +2,22 @@
- {08f657c8-6a2c-4a05-9cb8-0a24df22511f}
+ {100e33ce-9d1d-4aa8-a695-8a142faf8823}
- {137e5445-13e9-4d0e-88ca-b51c2a78b87f}
+ {77206dbd-501e-4814-8778-66aec54307c6}
- {5ca955a1-b2cf-4690-aab9-5e8d1ab6b763}
+ {5fcf0bdd-b676-4729-900c-bc7f1383a543}
- {5c4ae9d1-7bd9-4987-8827-56c88c89d82d}
+ {85efd7ee-ee09-40d2-acd1-3a29ed7439f6}
- {62d12f40-dd7c-4f3d-b128-b1a896b55544}
+ {b862c44f-e276-42f3-b078-837cf482a0c1}
- {34619493-0c10-4820-a64c-1a7b24284750}
+ {9d999f10-40c8-408d-bc98-354804d153eb}
diff --git a/Data/SQLite/SQLite_vs170.vcxproj b/Data/SQLite/SQLite_vs170.vcxproj
index 5c07da8ef..d1c1fe344 100644
--- a/Data/SQLite/SQLite_vs170.vcxproj
+++ b/Data/SQLite/SQLite_vs170.vcxproj
@@ -1,4 +1,4 @@
-
+
@@ -81,7 +81,7 @@
SQLite
Win32Proj
-
+
StaticLibrary
MultiByte
@@ -172,65 +172,65 @@
MultiByte
v143
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- <_ProjectFileVersion>17.0.34714.143
+ <_ProjectFileVersion>17.0.35327.3
PocoDataSQLiteA64d
PocoDataSQLitemdd
PocoDataSQLitemtd
@@ -332,7 +332,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebugDLL
@@ -340,7 +340,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -370,16 +370,16 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
true
MultiThreadedDLL
false
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
4996;4244;4018;%(DisableSpecificWarnings)
@@ -392,7 +392,7 @@
..\..\binA64\PocoDataSQLiteA64.dll
true
false
- ..\..\libA64;%(AdditionalLibraryDirectories)
+ ..\..\cmakebuild\lib;%(AdditionalLibraryDirectories)
Console
true
true
@@ -404,7 +404,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebug
@@ -412,7 +412,7 @@
true
true
true
-
+
$(OutDir)$(TargetName).pdb
Level3
ProgramDatabase
@@ -435,16 +435,16 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
MultiThreaded
false
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
4996;4244;4018;%(DisableSpecificWarnings)
@@ -461,7 +461,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebugDLL
@@ -469,7 +469,7 @@
true
true
true
-
+
$(OutDir)$(TargetName).pdb
Level3
ProgramDatabase
@@ -492,16 +492,16 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
MultiThreadedDLL
false
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
4996;4244;4018;%(DisableSpecificWarnings)
@@ -518,7 +518,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebugDLL
@@ -526,7 +526,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -556,16 +556,16 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
true
MultiThreadedDLL
false
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
4996;4244;4018;%(DisableSpecificWarnings)
@@ -590,7 +590,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebug
@@ -598,7 +598,7 @@
true
true
true
-
+
$(OutDir)$(TargetName).pdb
Level3
ProgramDatabase
@@ -621,16 +621,16 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
MultiThreaded
false
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
4996;4244;4018;%(DisableSpecificWarnings)
@@ -647,7 +647,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebugDLL
@@ -655,7 +655,7 @@
true
true
true
-
+
$(OutDir)$(TargetName).pdb
Level3
ProgramDatabase
@@ -678,17 +678,17 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
MultiThreadedDLL
false
true
true
true
-
+
$(OutDir)$(TargetName).pdb
Level3
-
+
Default
4996;4244;4018;%(DisableSpecificWarnings)
/Zc:__cplusplus %(AdditionalOptions)
@@ -704,7 +704,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebugDLL
@@ -712,7 +712,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -742,16 +742,16 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;_USRDLL;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;SQLite_EXPORTS;%(PreprocessorDefinitions)
true
MultiThreadedDLL
false
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
4996;4244;4018;%(DisableSpecificWarnings)
@@ -776,7 +776,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebug
@@ -784,7 +784,7 @@
true
true
true
-
+
$(OutDir)$(TargetName).pdb
Level3
ProgramDatabase
@@ -807,16 +807,16 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
MultiThreaded
false
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
4996;4244;4018;%(DisableSpecificWarnings)
@@ -833,7 +833,7 @@
Disabled
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;_DEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
EnableFastChecks
MultiThreadedDebugDLL
@@ -841,7 +841,7 @@
true
true
true
-
+
$(OutDir)$(TargetName).pdb
Level3
ProgramDatabase
@@ -864,16 +864,16 @@
Speed
true
.\include;..\..\Foundation\include;..\..\Data\include;%(AdditionalIncludeDirectories)
- WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS3;SQLITE_ENABLE_FTS3_PARENTHESIS;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
+ WIN32;NDEBUG;_WINDOWS;POCO_STATIC;SQLITE_THREADSAFE=1;SQLITE_ENABLE_FTS5;SQLITE_OMIT_UTF16;SQLITE_OMIT_PROGRESS_CALLBACK;SQLITE_OMIT_COMPLETE;SQLITE_OMIT_TCL_VARIABLE;SQLITE_OMIT_DEPRECATED;%(PreprocessorDefinitions)
true
MultiThreadedDLL
false
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
4996;4244;4018;%(DisableSpecificWarnings)
@@ -887,16 +887,16 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -961,6 +961,6 @@
true
-
-
-
+
+
+
\ No newline at end of file
diff --git a/Data/SQLite/SQLite_vs170.vcxproj.filters b/Data/SQLite/SQLite_vs170.vcxproj.filters
index 4764bc27e..2f5e07103 100644
--- a/Data/SQLite/SQLite_vs170.vcxproj.filters
+++ b/Data/SQLite/SQLite_vs170.vcxproj.filters
@@ -2,22 +2,22 @@
- {c43e4fe6-e999-4710-abf9-c3ac71054bdf}
+ {ae0dae38-b1e2-4c25-8986-ffb7a71d63d2}
- {256a7282-f781-469b-82ef-898c04defe77}
+ {967a7f18-16d5-4138-963c-14f5581c1d06}
- {1dec9834-f18c-4dfe-8e14-d35b73b83636}
+ {750e3590-154f-43ef-922f-fb208184f6cb}
- {3a52346c-b114-4989-9c9d-55627fabbe24}
+ {b491a2c6-9895-4ba1-b059-50b156e55b0e}
- {faae9992-6c0f-4ac6-9af2-2e3a2bb39def}
+ {518b3aba-5a41-47bc-b125-23bc694773a9}
- {e9f5da58-ed7a-4e9d-8731-751b30b0f2a8}
+ {930ce918-f656-4d48-ab21-addd59889448}
diff --git a/Data/SQLite/testsuite/src/SQLiteTest.cpp b/Data/SQLite/testsuite/src/SQLiteTest.cpp
index 824212732..71e54f4a9 100755
--- a/Data/SQLite/testsuite/src/SQLiteTest.cpp
+++ b/Data/SQLite/testsuite/src/SQLiteTest.cpp
@@ -3588,48 +3588,56 @@ void SQLiteTest::testTransactor()
}
-void SQLiteTest::testFTS3()
+void SQLiteTest::testFTS()
{
-#ifdef SQLITE_ENABLE_FTS3
+#if defined(SQLITE_ENABLE_FTS3) || defined(SQLITE_ENABLE_FTS5)
Session session(Poco::Data::SQLite::Connector::KEY, "dummy.db");
- assertTrue (session.isConnected());
+ assertTrue(session.isConnected());
session << "DROP TABLE IF EXISTS docs", now;
+
+#if defined(SQLITE_ENABLE_FTS5)
+ session << "CREATE VIRTUAL TABLE docs USING fts5(content)", now;
+ const std::string idColumn = "rowid";
+#elif defined(SQLITE_ENABLE_FTS3)
session << "CREATE VIRTUAL TABLE docs USING fts3()", now;
+ const std::string idColumn = "docid";
+#endif
- session << "INSERT INTO docs(docid, content) VALUES(1, 'a database is a software system')", now;
- session << "INSERT INTO docs(docid, content) VALUES(2, 'sqlite is a software system')", now;
- session << "INSERT INTO docs(docid, content) VALUES(3, 'sqlite is a database')", now;
+ session << "INSERT INTO docs(" << idColumn << ", content) VALUES(1, 'a database is a software system')", now;
+ session << "INSERT INTO docs(" << idColumn << ", content) VALUES(2, 'sqlite is a software system')", now;
+ session << "INSERT INTO docs(" << idColumn << ", content) VALUES(3, 'sqlite is a database')", now;
- int docid = 0;
- session << "SELECT docid FROM docs WHERE docs MATCH 'sqlite AND database'", into(docid), now;
- assertTrue (docid == 3);
+ int id = 0;
+ session << "SELECT " << idColumn << " FROM docs WHERE docs MATCH 'sqlite AND database'", into(id), now;
+ assertTrue(id == 3);
- docid = 0;
- session << "SELECT docid FROM docs WHERE docs MATCH 'database sqlite'", into(docid), now;
- assertTrue (docid == 3);
+ id = 0;
+ session << "SELECT " << idColumn << " FROM docs WHERE docs MATCH 'database sqlite'", into(id), now;
+ assertTrue(id == 3);
- std::vector docids;
- session << "SELECT docid FROM docs WHERE docs MATCH 'sqlite OR database' ORDER BY docid",
- into(docids), now;
- assertTrue (docids.size() == 3);
- assertTrue (docids[0] == 1);
- assertTrue (docids[1] == 2);
- assertTrue (docids[2] == 3);
+ std::vector ids;
+ session << "SELECT " << idColumn << " FROM docs WHERE docs MATCH 'sqlite OR database' ORDER BY " << idColumn,
+ into(ids), now;
+ assertTrue(ids.size() == 3);
+ assertTrue(ids[0] == 1);
+ assertTrue(ids[1] == 2);
+ assertTrue(ids[2] == 3);
std::string content;
- docid = 0;
- session << "SELECT docid, content FROM docs WHERE docs MATCH 'database NOT sqlite'",
- into(docid), into(content), now;
- assertTrue (docid == 1);
- assertTrue (content == "a database is a software system");
+ id = 0;
+ session << "SELECT " << idColumn << ", content FROM docs WHERE docs MATCH 'database NOT sqlite'",
+ into(id), into(content), now;
+ assertTrue(id == 1);
+ assertTrue(content == "a database is a software system");
+
+ id = 0;
+ session << "SELECT count(*) FROM docs WHERE docs MATCH 'database and sqlite'", into(id), now;
+ assertTrue(id == 0);
- docid = 0;
- session << "SELECT count(*) FROM docs WHERE docs MATCH 'database and sqlite'", into(docid), now;
- assertTrue (docid == 0);
#else
std::cout << "SQLite FTS not enabled, test not executed." << std::endl;
-#endif // SQLITE_ENABLE_FTS3
+#endif
}
@@ -3856,7 +3864,7 @@ CppUnit::Test* SQLiteTest::suite()
CppUnit_addTest(pSuite, SQLiteTest, testSessionTransactionRepeatableRead);
CppUnit_addTest(pSuite, SQLiteTest, testTransaction);
CppUnit_addTest(pSuite, SQLiteTest, testTransactor);
- CppUnit_addTest(pSuite, SQLiteTest, testFTS3);
+ CppUnit_addTest(pSuite, SQLiteTest, testFTS);
CppUnit_addTest(pSuite, SQLiteTest, testIllegalFilePath);
CppUnit_addTest(pSuite, SQLiteTest, testTransactionTypeProperty);
CppUnit_addTest(pSuite, SQLiteTest, testRecordsetCopyMove);
diff --git a/Data/SQLite/testsuite/src/SQLiteTest.h b/Data/SQLite/testsuite/src/SQLiteTest.h
index e860b365d..400b0358d 100755
--- a/Data/SQLite/testsuite/src/SQLiteTest.h
+++ b/Data/SQLite/testsuite/src/SQLiteTest.h
@@ -139,7 +139,7 @@ public:
void testTransaction();
void testTransactor();
- void testFTS3();
+ void testFTS();
void testIllegalFilePath();
void testTransactionTypeProperty();
diff --git a/PocoDoc/CMakeLists.txt b/PocoDoc/CMakeLists.txt
index 6aea654d5..875564bc5 100644
--- a/PocoDoc/CMakeLists.txt
+++ b/PocoDoc/CMakeLists.txt
@@ -4,7 +4,12 @@ POCO_SOURCES_AUTO(SRCS ${SRCS_G})
add_executable(PocoDoc ${SRCS})
-target_link_libraries(PocoDoc PUBLIC Poco::Util Poco::XML Poco::CppParser)
+target_link_libraries(PocoDoc PUBLIC Poco::Util Poco::XML Poco::CppParser Poco::DataSQLite Poco::Data)
+
+if(ENABLE_DATA_SQLITE_FTS5)
+ target_compile_definitions(PocoDoc PRIVATE POCO_ENABLE_SQLITE_FTS5)
+endif()
+
install(
TARGETS PocoDoc EXPORT PocoDocTargets
diff --git a/PocoDoc/Makefile b/PocoDoc/Makefile
index e0afbddcc..71a0ce906 100644
--- a/PocoDoc/Makefile
+++ b/PocoDoc/Makefile
@@ -10,6 +10,10 @@ objects = DocWriter PocoDoc
target = PocoDoc
target_version = 1
-target_libs = PocoCppParser PocoFoundation PocoXML PocoUtil
+target_libs = PocoCppParser PocoDataSQLite PocoData PocoFoundation PocoXML PocoUtil
+
+ifdef POCO_ENABLE_SQLITE_FTS5
+CXXFLAGS += -DPOCO_ENABLE_SQLITE_FTS5
+endif
include $(POCO_BASE)/build/rules/exec
diff --git a/PocoDoc/PocoDoc_vs160.vcxproj b/PocoDoc/PocoDoc_vs160.vcxproj
index edebfcdf1..c6eb74dd7 100644
--- a/PocoDoc/PocoDoc_vs160.vcxproj
+++ b/PocoDoc/PocoDoc_vs160.vcxproj
@@ -1,4 +1,4 @@
-
+
@@ -57,108 +57,108 @@
PocoDoc
Win32Proj
-
+
Application
MultiByte
- v142
+ v143
Application
MultiByte
- v142
+ v143
Application
MultiByte
- v142
+ v143
Application
MultiByte
- v142
+ v143
Application
MultiByte
- v142
+ v143
Application
MultiByte
- v142
+ v143
Application
MultiByte
- v142
+ v143
Application
MultiByte
- v142
+ v143
Application
MultiByte
- v142
+ v143
Application
MultiByte
- v142
+ v143
Application
MultiByte
- v142
+ v143
Application
MultiByte
- v142
+ v143
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- <_ProjectFileVersion>17.0.34714.143
+ <_ProjectFileVersion>17.0.35327.3
PocoDocd
PocoDocd
PocoDocd
@@ -235,7 +235,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -244,7 +244,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -272,7 +272,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
true
MultiThreadedDLL
@@ -280,9 +280,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -304,7 +304,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -313,7 +313,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -341,7 +341,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
MultiThreaded
@@ -349,9 +349,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -373,7 +373,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -382,7 +382,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -410,7 +410,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
MultiThreadedDLL
@@ -418,9 +418,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -442,7 +442,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -451,7 +451,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -479,7 +479,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
true
MultiThreadedDLL
@@ -487,9 +487,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -511,7 +511,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -520,7 +520,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -548,7 +548,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
MultiThreaded
@@ -556,9 +556,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -580,7 +580,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -589,7 +589,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -617,7 +617,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
MultiThreadedDLL
@@ -625,9 +625,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -659,8 +659,8 @@
-
+
-
-
-
+
+
+
\ No newline at end of file
diff --git a/PocoDoc/PocoDoc_vs160.vcxproj.filters b/PocoDoc/PocoDoc_vs160.vcxproj.filters
index 86dd0760f..5bf82b63f 100644
--- a/PocoDoc/PocoDoc_vs160.vcxproj.filters
+++ b/PocoDoc/PocoDoc_vs160.vcxproj.filters
@@ -2,22 +2,22 @@
- {60784c21-9594-42df-b825-d0f44b70df1c}
+ {0b291a8e-c71d-46bc-8348-147e056b8a09}
- {2a417507-cb80-467d-b536-9153294bfc14}
+ {29bd7595-9fdb-4c4c-b3dd-0f693a4c2524}
- {b343204e-6b48-4460-bada-38c9cfe379c0}
+ {ba8b5543-a1b8-42e2-ac04-e652c5cdbced}
- {572c4d2f-4b19-47ab-9865-e808cb6873e7}
+ {155b2f8e-3aa5-4355-9820-93c49058304c}
- {07846630-d09f-4420-a819-1485dc758039}
+ {0111ff6f-7026-43c7-8721-0a781c4e2011}
- {0979336d-8413-4b57-876f-3093be25d25e}
+ {add29ffa-71d0-4b29-8772-3b8ede2c0578}
diff --git a/PocoDoc/PocoDoc_vs170.vcxproj b/PocoDoc/PocoDoc_vs170.vcxproj
index 87cd2a4d0..9f6dc495c 100644
--- a/PocoDoc/PocoDoc_vs170.vcxproj
+++ b/PocoDoc/PocoDoc_vs170.vcxproj
@@ -1,4 +1,4 @@
-
+
@@ -81,7 +81,7 @@
PocoDoc
Win32Proj
-
+
Application
MultiByte
@@ -172,65 +172,65 @@
MultiByte
v143
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
- <_ProjectFileVersion>17.0.34714.143
+ <_ProjectFileVersion>17.0.35327.3
PocoDocd
PocoDocd
PocoDocd
@@ -343,7 +343,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -352,7 +352,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -380,7 +380,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
true
MultiThreadedDLL
@@ -388,9 +388,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -401,7 +401,7 @@
ws2_32.lib;iphlpapi.lib;%(AdditionalDependencies)
binA64\PocoDoc.exe
- ..\libA64;%(AdditionalLibraryDirectories)
+ ..\cmakebuild\lib;%(AdditionalLibraryDirectories)
false
Console
true
@@ -412,7 +412,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -421,7 +421,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -449,7 +449,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
MultiThreaded
@@ -457,9 +457,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -481,7 +481,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -490,7 +490,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -518,7 +518,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
MultiThreadedDLL
@@ -526,9 +526,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -550,7 +550,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -559,7 +559,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -587,7 +587,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
true
MultiThreadedDLL
@@ -595,9 +595,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -619,7 +619,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -628,7 +628,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -656,7 +656,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
MultiThreaded
@@ -664,9 +664,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -688,7 +688,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -697,7 +697,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -725,7 +725,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
MultiThreadedDLL
@@ -733,9 +733,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -757,7 +757,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -766,7 +766,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -794,7 +794,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;%(PreprocessorDefinitions)
true
MultiThreadedDLL
@@ -802,9 +802,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -826,7 +826,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -835,7 +835,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -863,7 +863,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
MultiThreaded
@@ -871,9 +871,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -895,7 +895,7 @@
Disabled
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;_DEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
EnableFastChecks
@@ -904,7 +904,7 @@
true
true
true
-
+
Level3
ProgramDatabase
Default
@@ -932,7 +932,7 @@
true
Speed
true
- .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;%(AdditionalIncludeDirectories)
+ .\include;..\Foundation\include;..\XML\include;..\Util\include;..\CppParser\include;..\Data\include;..\Data\SQLite\include;%(AdditionalIncludeDirectories)
WIN32;NDEBUG;_WINDOWS;WINVER=0x0500;POCO_STATIC;%(PreprocessorDefinitions)
true
MultiThreadedDLL
@@ -940,9 +940,9 @@
true
true
true
-
+
Level3
-
+
Default
$(OutDir)$(TargetName).pdb
/Zc:__cplusplus %(AdditionalOptions)
@@ -974,8 +974,8 @@
-
+
-
-
-
+
+
+
\ No newline at end of file
diff --git a/PocoDoc/PocoDoc_vs170.vcxproj.filters b/PocoDoc/PocoDoc_vs170.vcxproj.filters
index 1f42e3ada..dd5ddf3fa 100644
--- a/PocoDoc/PocoDoc_vs170.vcxproj.filters
+++ b/PocoDoc/PocoDoc_vs170.vcxproj.filters
@@ -2,22 +2,22 @@
- {abb515b0-37cf-43bc-8081-2417ba256a35}
+ {e127d34c-f78b-4902-b934-a6974369873e}
- {034e916f-4a84-41c9-91f7-d2a09774ada0}
+ {3c4639a2-bdfa-454e-a0bb-156efcdc4d1b}
- {e1d183cb-db45-4d44-8191-46a8ff6fbbbd}
+ {1fac1a57-a6be-4556-ab65-6242b798235b}
- {5da1f85a-7191-4d50-8747-370fd4464c83}
+ {87558a66-7531-4268-9dfd-6b29ab199b39}
- {13f498d3-46dc-4820-abf1-9149f60b7357}
+ {e9f8c28c-cd2e-452d-a888-629342edaa16}
- {bd80a19d-554f-4399-b193-eb5379ca1d4c}
+ {a5c1686d-ccb8-4494-83c9-87491c65cd97}
diff --git a/PocoDoc/PocoDoc_vs90.vcproj b/PocoDoc/PocoDoc_vs90.vcproj
index 6c7d56679..b2096c74c 100644
--- a/PocoDoc/PocoDoc_vs90.vcproj
+++ b/PocoDoc/PocoDoc_vs90.vcproj
@@ -31,7 +31,7 @@
#include
#include
#include
+#include
+#include
+using namespace Poco::Data::Keywords;
+using Poco::Data::Session;
+using Poco::Data::Statement;
using Poco::NumberFormatter;
using Poco::Path;
using Poco::DateTime;
@@ -48,9 +55,11 @@ DocWriter::StringMap DocWriter::_strings;
Poco::Logger* DocWriter::_pLogger(0);
const std::string DocWriter::RFC_URI("https://www.ietf.org/rfc/rfc");
const std::string DocWriter::GITHUB_POCO_URI("https://github.com/pocoproject/poco");
+const std::string DocWriter::DATABASE_DIR("/dist/");
+const std::string DocWriter::DATABASE_NAME("docs.db");
-DocWriter::DocWriter(const NameSpace::SymbolTable& symbols, const std::string& path, bool prettifyCode, bool noFrames):
+DocWriter::DocWriter(const NameSpace::SymbolTable& symbols, const std::string& path, bool prettifyCode, bool noFrames, bool searchIndex):
_prettifyCode(prettifyCode),
_noFrames(noFrames),
_htmlMode(false),
@@ -60,7 +69,8 @@ DocWriter::DocWriter(const NameSpace::SymbolTable& symbols, const std::string& p
_pNameSpace(0),
_pendingLine(false),
_indent(0),
- _titleId(0)
+ _titleId(0),
+ _searchIndex(searchIndex)
{
_pLogger = &Poco::Logger::get("DocWriter");
@@ -70,6 +80,7 @@ DocWriter::DocWriter(const NameSpace::SymbolTable& symbols, const std::string& p
logger().information(std::string("Loading translation strings [") + _language + "]");
loadStrings(_language);
+ if (_searchIndex) initDatabase();
}
@@ -78,6 +89,35 @@ DocWriter::~DocWriter()
}
+void DocWriter::initDatabase()
+{
+ Poco::Data::SQLite::Connector::registerConnector();
+ std::string dbPath = _path + DATABASE_DIR + DATABASE_NAME;
+ Session session("SQLite", dbPath);
+ session << "DROP TABLE IF EXISTS docs", now;
+ session << "CREATE VIRTUAL TABLE docs USING fts5( link, content )", now;
+}
+
+
+void DocWriter::writeSearchIndex(std::string link, std::string content)
+{
+ try
+ {
+ if (!content.empty())
+ {
+ Poco::Data::SQLite::Connector::registerConnector();
+ std::string dbPath = _path + DATABASE_DIR + DATABASE_NAME;
+ Session session("SQLite", dbPath);
+ session << "INSERT INTO docs(link, content) VALUES (?, ?)", use(link), use(content), now;
+ }
+ }
+ catch (Poco::Exception& e)
+ {
+ _pLogger->error(e.displayText());
+ }
+}
+
+
void DocWriter::addPage(const std::string& path)
{
Page page;
@@ -208,7 +248,7 @@ void DocWriter::writeNavigation()
ostr << "
\n"; // workaround to avoid cutting off a few pixels from last line
endBody(ostr);
ostr << "" << std::endl;
- writeFooter(ostr, NO_TRACKING | NO_CUSTOM_HTML);
+ writeFooter(ostr, NO_TRACKING);
}
@@ -386,6 +426,7 @@ void DocWriter::writeClass(const Struct* pStruct)
_pNameSpace = pStruct;
std::string path(pathFor(fileNameFor(pStruct)));
std::ofstream ostr(path.c_str());
+ std::ostringstream sstr;
if (!ostr.good()) throw Poco::CreateFileException(path);
std::string header;
if (pStruct->isClass())
@@ -410,7 +451,7 @@ void DocWriter::writeClass(const Struct* pStruct)
logger().notice(std::string("TODO in class documentation for ") + pStruct->fullName());
writeSubTitle(ostr, tr("Description"));
- writeDescription(ostr, pStruct->getDocumentation());
+ writeDescription(ostr, pStruct->getDocumentation(), &sstr);
}
else if (pStruct->isPublic() && !pStruct->isDerived())
{
@@ -419,23 +460,25 @@ void DocWriter::writeClass(const Struct* pStruct)
writeInheritance(ostr, pStruct);
writeMethodSummary(ostr, pStruct);
writeNestedClasses(ostr, pStruct);
- writeTypes(ostr, pStruct);
- writeAliases(ostr, pStruct);
- writeEnums(ostr, pStruct);
+ writeTypes(ostr, pStruct, &sstr);
+ writeAliases(ostr, pStruct, &sstr);
+ writeEnums(ostr, pStruct, &sstr);
writeConstructors(ostr, pStruct);
writeDestructor(ostr, pStruct);
writeMethods(ostr, pStruct);
- writeVariables(ostr, pStruct);
+ writeVariables(ostr, pStruct, &sstr);
writeCopyright(ostr);
endContent(ostr);
endBody(ostr);
writeFooter(ostr);
+ if (_searchIndex) writeSearchIndex(fileNameFor(pStruct), sstr.str());
}
void DocWriter::writeNameSpace(const NameSpace* pNameSpace)
{
_pNameSpace = pNameSpace;
+ std::ostringstream sstr;
std::string path(pathFor(fileNameFor(pNameSpace)));
std::ofstream ostr(path.c_str());
if (!ostr.good()) throw Poco::CreateFileException(path);
@@ -445,22 +488,23 @@ void DocWriter::writeNameSpace(const NameSpace* pNameSpace)
writeNavigationFrame(ostr, "", "");
beginContent(ostr);
writeSubTitle(ostr, tr("Overview"));
- writeNameSpacesSummary(ostr, pNameSpace);
- writeClassesSummary(ostr, pNameSpace);
- writeTypesSummary(ostr, pNameSpace);
- writeAliasesSummary(ostr, pNameSpace);
- writeFunctionsSummary(ostr, pNameSpace);
- writeNameSpaces(ostr, pNameSpace);
- writeClasses(ostr, pNameSpace);
- writeTypes(ostr, pNameSpace);
- writeAliases(ostr, pNameSpace);
- writeEnums(ostr, pNameSpace);
- writeFunctions(ostr, pNameSpace);
- writeVariables(ostr, pNameSpace);
+ writeNameSpacesSummary(ostr, pNameSpace, &sstr);
+ writeClassesSummary(ostr, pNameSpace, &sstr);
+ writeTypesSummary(ostr, pNameSpace, &sstr);
+ writeAliasesSummary(ostr, pNameSpace, &sstr);
+ writeFunctionsSummary(ostr, pNameSpace, &sstr);
+ writeNameSpaces(ostr, pNameSpace, &sstr);
+ writeClasses(ostr, pNameSpace, &sstr);
+ writeTypes(ostr, pNameSpace, &sstr);
+ writeAliases(ostr, pNameSpace, &sstr);
+ writeEnums(ostr, pNameSpace, &sstr);
+ writeFunctions(ostr, pNameSpace, &sstr);
+ writeVariables(ostr, pNameSpace, &sstr);
writeCopyright(ostr);
endContent(ostr);
endBody(ostr);
writeFooter(ostr);
+ if (_searchIndex) writeSearchIndex(fileNameFor(pNameSpace), sstr.str());
}
@@ -468,6 +512,7 @@ void DocWriter::writePackage(const std::string& file, const std::string& library
{
std::string path(pathFor(file));
std::ofstream ostr(path.c_str());
+ std::ostringstream sstr;
if (!ostr.good()) throw Poco::CreateFileException(path);
writeHeader(ostr, tr("Package_Index"), "js/iframeResizer.min.js");
writeTitle(ostr, tr("Library") + " " + library, tr("Package") + " " + package);
@@ -561,6 +606,7 @@ void DocWriter::writePackage(const std::string& file, const std::string& library
endContent(ostr);
endBody(ostr);
writeFooter(ostr);
+ if (_searchIndex) writeSearchIndex(file, sstr.str());
}
@@ -641,6 +687,7 @@ void DocWriter::writeHeader(std::ostream& ostr, const std::string& title, const
ostr << "" << std::endl;
ostr << "" << std::endl;
ostr << "" << std::endl;
+ ostr << "\n";
if (_prettifyCode)
{
ostr << "" << std::endl;
@@ -705,7 +752,73 @@ void DocWriter::writeCopyright(std::ostream& ostr)
}
ostr << "
\n";
}
+void DocWriter::writeSearchBox(std::ostream& ostr)
+{
+ ostr << "\n";
+ ostr << "
\n";
+ ostr << "
\n";
+ ostr << "
\n";
+ ostr << "\n";
+
+ ostr << "\n\n";
+}
void DocWriter::writeTitle(std::ostream& ostr, const std::string& category, const std::string& title)
{
@@ -716,14 +829,14 @@ void DocWriter::writeTitle(std::ostream& ostr, const std::string& category, cons
{
ostr << "\n";
}
- ostr << "";
+
if (category.empty())
ostr << " ";
else
- ostr << htmlize(category);
- ostr << "
\n";
- ostr << "" << htmlize(title) << "
";
- ostr << "\n\n";
+ ostr << "" << htmlize(category) << "
";
+
+ ostr << "" << htmlize(title) << "
";
+ writeSearchBox(ostr);
}
@@ -786,6 +899,7 @@ void DocWriter::writeTitle(std::ostream& ostr, const NameSpace* pNameSpace, cons
<< "";
}
ostr << "\n\n";
+ writeSearchBox(ostr);
}
@@ -808,7 +922,7 @@ void DocWriter::writeNavigationFrame(std::ostream& ostr, const std::string& grou
query += item;
}
ostr << "\n";
- ostr << "\n";
+ ostr << "\n";
ostr << "
\n";
}
@@ -837,10 +951,10 @@ void DocWriter::endContent(std::ostream& ostr)
}
-void DocWriter::writeDescription(std::ostream& ostr, const std::string& text)
+void DocWriter::writeDescription(std::ostream& ostr, const std::string& text, std::ostream* pSstr)
{
ostr << "\n"
- << "
";
+ << "
";
_titleId = 0;
_htmlMode = false;
@@ -851,7 +965,7 @@ void DocWriter::writeDescription(std::ostream& ostr, const std::string& text)
{
std::string line;
while (it != end && *it != '\n') line += *it++;
- writeDescriptionLine(ostr, line, state);
+ writeDescriptionLine(ostr, line, state, pSstr);
if (it != end) ++it;
}
switch (state)
@@ -875,7 +989,7 @@ void DocWriter::writeDescription(std::ostream& ostr, const std::string& text)
}
-void DocWriter::writeDescriptionLine(std::ostream& ostr, const std::string& text, TextState& state)
+void DocWriter::writeDescriptionLine(std::ostream& ostr, const std::string& text, TextState& state, std::ostream* pSstr)
{
if (_htmlMode)
{
@@ -895,7 +1009,7 @@ void DocWriter::writeDescriptionLine(std::ostream& ostr, const std::string& text
switch (state)
{
case TEXT_PARAGRAPH:
- writeText(ostr, text);
+ writeText(ostr, text, pSstr);
break;
case TEXT_LIST:
ostr << "\n\n
";
@@ -1061,7 +1175,7 @@ std::string DocWriter::htmlizeName(const std::string& name)
}
-void DocWriter::writeText(std::ostream& ostr, const std::string& text)
+void DocWriter::writeText(std::ostream& ostr, const std::string& text, std::ostream* pSstr)
{
std::string::const_iterator it(text.begin());
std::string::const_iterator end(text.end());
@@ -1085,21 +1199,23 @@ void DocWriter::writeText(std::ostream& ostr, const std::string& text)
}
while (it != end && std::isspace(*it)) ++it;
ostr << "
<" << heading << ">" << format("
", _titleId++) << htmlize(std::string(it, end)) << "" << heading << ">
" << std::endl;
+ if (pSstr) *pSstr << std::string(it, end) << '\n';
return;
}
}
- writeText(ostr, it, end);
+ writeText(ostr, it, end, pSstr);
+ if (pSstr) *pSstr << ' ';
ostr << ' ';
}
-void DocWriter::writeText(std::ostream& ostr, std::string::const_iterator begin, const std::string::const_iterator& end)
+void DocWriter::writeText(std::ostream& ostr, std::string::const_iterator begin, const std::string::const_iterator& end, std::ostream* pSstr)
{
std::string token;
nextToken(begin, end, token);
while (!token.empty())
{
- if (!writeSymbol(ostr, token, begin, end) && !writeSpecial(ostr, token, begin, end))
+ if (!writeSymbol(ostr, token, begin, end, pSstr) && !writeSpecial(ostr, token, begin, end))
{
if (token == "[[")
{
@@ -1121,7 +1237,7 @@ void DocWriter::writeText(std::ostream& ostr, std::string::const_iterator begin,
std::string target;
if (uri.compare(0, 7, "http://") == 0 || uri.compare(0, 8, "https://") == 0)
target = "_blank";
- writeTargetLink(ostr, uri, text, target);
+ writeTargetLink(ostr, uri, text, target, pSstr);
}
begin = it;
nextToken(begin, end, token);
@@ -1148,9 +1264,8 @@ void DocWriter::writeText(std::ostream& ostr, std::string::const_iterator begin,
}
begin = it;
}
- if (token == "GH" || token == "PR")
+ if (token == "GH")
{
- bool isPR = token == "PR";
std::string uri(GITHUB_POCO_URI);
std::string::const_iterator it(begin);
std::string spc;
@@ -1172,7 +1287,7 @@ void DocWriter::writeText(std::ostream& ostr, std::string::const_iterator begin,
nextToken(begin, end, n);
if (!n.empty() && std::isdigit(n[0]))
{
- uri += isPR ? "/pull/" : "/issues/";
+ uri += "/issues/";
uri += n;
writeTargetLink(ostr, uri, token + " #" + n, "_blank");
nextToken(begin, end, token);
@@ -1209,6 +1324,7 @@ void DocWriter::writeText(std::ostream& ostr, std::string::const_iterator begin,
else
{
ostr << htmlize(token);
+ if (pSstr) *pSstr << token;
}
nextToken(begin, end, token);
}
@@ -1237,7 +1353,7 @@ void DocWriter::writeDecl(std::ostream& ostr, std::string::const_iterator begin,
}
-bool DocWriter::writeSymbol(std::ostream& ostr, std::string& token, std::string::const_iterator& begin, const std::string::const_iterator& end)
+bool DocWriter::writeSymbol(std::ostream& ostr, std::string& token, std::string::const_iterator& begin, const std::string::const_iterator& end, std::ostream* pSstr)
{
if (std::isalnum(token[0]) && _pNameSpace)
{
@@ -1262,7 +1378,7 @@ bool DocWriter::writeSymbol(std::ostream& ostr, std::string& token, std::string:
Symbol* pSym = _pNameSpace->lookup(id);
if (pSym)
{
- writeLink(ostr, pSym, id);
+ writeLink(ostr, pSym, id, pSstr);
nextToken(begin, end, token);
return true;
}
@@ -1300,7 +1416,7 @@ bool DocWriter::writeSpecial(std::ostream& ostr, std::string& token, std::string
{
_htmlMode = false;
}
- else if (token == "" || token == "=")
+ else if (token == "")
{
std::string prop;
nextToken(begin, end, token);
@@ -1313,19 +1429,6 @@ bool DocWriter::writeSpecial(std::ostream& ostr, std::string& token, std::string
Application& app = Application::instance();
ostr << htmlize(app.config().getString(prop, std::string("NOT FOUND: ") + prop));
}
- else if (token == "-")
- {
- std::string prop;
- nextToken(begin, end, token);
- while (!token.empty() && token != "?>")
- {
- prop.append(token);
- nextToken(begin, end, token);
- }
- Poco::trimInPlace(prop);
- Application& app = Application::instance();
- ostr << app.config().getString(prop, "");
- }
else if (_htmlMode)
{
ostr << token;
@@ -1401,10 +1504,7 @@ void DocWriter::nextToken(std::string::const_iterator& it, const std::string::co
{
token += *it++;
if (it != end && std::ispunct(*it)) token += *it++;
- if (token != "<[" && token != "<*" && token != "nameSpaces(nameSpaces);
@@ -1673,7 +1773,7 @@ void DocWriter::writeNameSpacesSummary(std::ostream& ostr, const NameSpace* pNam
}
-void DocWriter::writeNameSpaces(std::ostream& ostr, const NameSpace* pNameSpace)
+void DocWriter::writeNameSpaces(std::ostream& ostr, const NameSpace* pNameSpace, std::ostream* pSstr)
{
NameSpace::SymbolTable nameSpaces;
pNameSpace->nameSpaces(nameSpaces);
@@ -1692,7 +1792,7 @@ void DocWriter::writeNameSpaces(std::ostream& ostr, const NameSpace* pNameSpace)
}
-void DocWriter::writeClassesSummary(std::ostream& ostr, const NameSpace* pNameSpace)
+void DocWriter::writeClassesSummary(std::ostream& ostr, const NameSpace* pNameSpace, std::ostream* pSstr)
{
NameSpace::SymbolTable classes;
pNameSpace->classes(classes);
@@ -1709,7 +1809,7 @@ void DocWriter::writeClassesSummary(std::ostream& ostr, const NameSpace* pNameSp
}
-void DocWriter::writeClasses(std::ostream& ostr, const NameSpace* pNameSpace)
+void DocWriter::writeClasses(std::ostream& ostr, const NameSpace* pNameSpace, std::ostream* pSstr)
{
NameSpace::SymbolTable classes;
pNameSpace->classes(classes);
@@ -1741,7 +1841,7 @@ void DocWriter::writeClassSummary(std::ostream& ostr, const Struct* pStruct)
}
-void DocWriter::writeTypesSummary(std::ostream& ostr, const NameSpace* pNameSpace)
+void DocWriter::writeTypesSummary(std::ostream& ostr, const NameSpace* pNameSpace, std::ostream* pSstr)
{
NameSpace::SymbolTable types;
pNameSpace->typeDefs(types);
@@ -1758,7 +1858,7 @@ void DocWriter::writeTypesSummary(std::ostream& ostr, const NameSpace* pNameSpac
}
-void DocWriter::writeAliasesSummary(std::ostream& ostr, const NameSpace* pNameSpace)
+void DocWriter::writeAliasesSummary(std::ostream& ostr, const NameSpace* pNameSpace, std::ostream* pSstr)
{
NameSpace::SymbolTable types;
pNameSpace->typeAliases(types);
@@ -1775,7 +1875,7 @@ void DocWriter::writeAliasesSummary(std::ostream& ostr, const NameSpace* pNameSp
}
-void DocWriter::writeTypes(std::ostream& ostr, const NameSpace* pNameSpace)
+void DocWriter::writeTypes(std::ostream& ostr, const NameSpace* pNameSpace, std::ostream* pSstr)
{
NameSpace::SymbolTable types;
pNameSpace->typeDefs(types);
@@ -1791,13 +1891,13 @@ void DocWriter::writeTypes(std::ostream& ostr, const NameSpace* pNameSpace)
for (NameSpace::Iterator it = types.begin(); it != types.end(); ++it)
{
if (it->second->getAccess() != Symbol::ACC_PRIVATE)
- writeType(ostr, static_cast(it->second));
+ writeType(ostr, static_cast(it->second), pSstr);
}
}
}
-void DocWriter::writeAliases(std::ostream& ostr, const NameSpace* pNameSpace)
+void DocWriter::writeAliases(std::ostream& ostr, const NameSpace* pNameSpace, std::ostream* pSstr)
{
NameSpace::SymbolTable types;
pNameSpace->typeAliases(types);
@@ -1813,13 +1913,13 @@ void DocWriter::writeAliases(std::ostream& ostr, const NameSpace* pNameSpace)
for (NameSpace::Iterator it = types.begin(); it != types.end(); ++it)
{
if (it->second->getAccess() != Symbol::ACC_PRIVATE)
- writeType(ostr, static_cast(it->second));
+ writeType(ostr, static_cast(it->second), pSstr);
}
}
}
-void DocWriter::writeType(std::ostream& ostr, const TypeDef* pType)
+void DocWriter::writeType(std::ostream& ostr, const TypeDef* pType, std::ostream* pSstr)
{
ostr << "";
writeAnchor(ostr, pType->name(), pType);
@@ -1829,11 +1929,11 @@ void DocWriter::writeType(std::ostream& ostr, const TypeDef* pType)
ostr << "
";
writeDecl(ostr, pType->declaration());
ostr << ";
\n";
- writeDescription(ostr, pType->getDocumentation());
+ writeDescription(ostr, pType->getDocumentation(), pSstr);
}
-void DocWriter::writeEnums(std::ostream& ostr, const NameSpace* pNameSpace)
+void DocWriter::writeEnums(std::ostream& ostr, const NameSpace* pNameSpace, std::ostream* pSstr)
{
NameSpace::SymbolTable enums;
pNameSpace->enums(enums);
@@ -1849,13 +1949,13 @@ void DocWriter::writeEnums(std::ostream& ostr, const NameSpace* pNameSpace)
for (NameSpace::Iterator it = enums.begin(); it != enums.end(); ++it)
{
if (it->second->getAccess() != Symbol::ACC_PRIVATE)
- writeEnum(ostr, static_cast(it->second));
+ writeEnum(ostr, static_cast(it->second), pSstr);
}
}
}
-void DocWriter::writeEnum(std::ostream& ostr, const Enum* pEnum)
+void DocWriter::writeEnum(std::ostream& ostr, const Enum* pEnum, std::ostream* pSstr)
{
ostr << "";
const std::string& name = pEnum->name();
@@ -1866,7 +1966,7 @@ void DocWriter::writeEnum(std::ostream& ostr, const Enum* pEnum)
if (pEnum->getAccess() != Symbol::ACC_PUBLIC)
writeIcon(ostr, "protected");
ostr << "
\n";
- writeDescription(ostr, pEnum->getDocumentation());
+ writeDescription(ostr, pEnum->getDocumentation(), pSstr);
for (Enum::Iterator it = pEnum->begin(); it != pEnum->end(); ++it)
{
const std::string& name = (*it)->name();
@@ -1876,7 +1976,7 @@ void DocWriter::writeEnum(std::ostream& ostr, const Enum* pEnum)
if (!value.empty())
ostr << " = " << htmlize(value);
ostr << "
\n";
- writeDescription(ostr, (*it)->getDocumentation());
+ writeDescription(ostr, (*it)->getDocumentation(), pSstr);
}
}
@@ -1928,7 +2028,7 @@ void DocWriter::writeMethods(std::ostream& ostr, const Struct* pStruct)
}
-void DocWriter::writeFunctionsSummary(std::ostream& ostr, const NameSpace* pNameSpace)
+void DocWriter::writeFunctionsSummary(std::ostream& ostr, const NameSpace* pNameSpace, std::ostream* pSstr)
{
NameSpace::SymbolTable funcs;
pNameSpace->functions(funcs);
@@ -1950,7 +2050,7 @@ void DocWriter::writeFunctionsSummary(std::ostream& ostr, const NameSpace* pName
}
-void DocWriter::writeFunctions(std::ostream& ostr, const NameSpace* pNameSpace)
+void DocWriter::writeFunctions(std::ostream& ostr, const NameSpace* pNameSpace, std::ostream* pSstr)
{
NameSpace::SymbolTable funcs;
pNameSpace->functions(funcs);
@@ -1965,7 +2065,7 @@ void DocWriter::writeFunctions(std::ostream& ostr, const NameSpace* pNameSpace)
}
-void DocWriter::writeFunction(std::ostream& ostr, const Function* pFunc)
+void DocWriter::writeFunction(std::ostream& ostr, const Function* pFunc, std::ostream* pSstr)
{
ostr << "
";
writeAnchor(ostr, pFunc->name(), pFunc);
@@ -1979,12 +2079,6 @@ void DocWriter::writeFunction(std::ostream& ostr, const Function* pFunc)
writeIcon(ostr, "inline");
ostr << "
\n";
ostr << "
";
-
- const std::string& attrs = pFunc->getAttributeList();
- if (!attrs.empty())
- {
- ostr << "" << htmlize(attrs) << "
";
- }
const std::string& decl = pFunc->declaration();
writeDecl(ostr, decl);
if (!std::isalnum(decl[decl.length() - 1]))
@@ -2022,7 +2116,7 @@ void DocWriter::writeFunction(std::ostream& ostr, const Function* pFunc)
ostr << " = 0";
ostr << ";
\n";
- if (pFunc->attrs().has("deprecated") || pFunc->getAttributeList().compare(0, 12, "[[deprecated") == 0)
+ if (pFunc->attrs().has("deprecated"))
{
writeDeprecated(ostr, "function");
}
@@ -2032,7 +2126,7 @@ void DocWriter::writeFunction(std::ostream& ostr, const Function* pFunc)
if (doc.empty() && pFunc->isPublic() && !pOverridden && !pFunc->isConstructor() && !pFunc->isDestructor())
logger().notice(std::string("Undocumented public function: ") + pFunc->fullName());
- writeDescription(ostr, doc);
+ writeDescription(ostr, doc, pSstr);
if (pOverridden)
{
ostr << "
" << tr("See_also") << ": ";
@@ -2042,7 +2136,7 @@ void DocWriter::writeFunction(std::ostream& ostr, const Function* pFunc)
}
-void DocWriter::writeVariables(std::ostream& ostr, const NameSpace* pNameSpace)
+void DocWriter::writeVariables(std::ostream& ostr, const NameSpace* pNameSpace, std::ostream* pSstr)
{
NameSpace::SymbolTable vars;
pNameSpace->variables(vars);
@@ -2059,18 +2153,18 @@ void DocWriter::writeVariables(std::ostream& ostr, const NameSpace* pNameSpace)
for (NameSpace::Iterator it = vars.begin(); it != vars.end(); ++it)
{
if (it->second->getAccess() == Symbol::ACC_PUBLIC)
- writeVariable(ostr, static_cast(it->second));
+ writeVariable(ostr, static_cast(it->second), pSstr);
}
for (NameSpace::Iterator it = vars.begin(); it != vars.end(); ++it)
{
if (it->second->getAccess() == Symbol::ACC_PROTECTED)
- writeVariable(ostr, static_cast(it->second));
+ writeVariable(ostr, static_cast(it->second), pSstr);
}
}
}
-void DocWriter::writeVariable(std::ostream& ostr, const Variable* pVar)
+void DocWriter::writeVariable(std::ostream& ostr, const Variable* pVar, std::ostream* pSstr)
{
ostr << "";
writeAnchor(ostr, pVar->name(), pVar);
@@ -2082,7 +2176,7 @@ void DocWriter::writeVariable(std::ostream& ostr, const Variable* pVar)
ostr << "
";
writeDecl(ostr, pVar->declaration());
ostr << ";
\n";
- writeDescription(ostr, pVar->getDocumentation());
+ writeDescription(ostr, pVar->getDocumentation(), pSstr);
}
@@ -2106,9 +2200,10 @@ void DocWriter::writeLink(std::ostream& ostr, const std::string& uri, const std:
}
-void DocWriter::writeLink(std::ostream& ostr, const Symbol* pSymbol, const std::string& name)
+void DocWriter::writeLink(std::ostream& ostr, const Symbol* pSymbol, const std::string& name, std::ostream* pSstr)
{
ostr << "" << htmlizeName(name) << "";
+ if (pSstr) *pSstr << name;
}
@@ -2118,7 +2213,7 @@ void DocWriter::writeLink(std::ostream& ostr, const std::string& uri, const std:
}
-void DocWriter::writeTargetLink(std::ostream& ostr, const std::string& uri, const std::string& text, const std::string& target)
+void DocWriter::writeTargetLink(std::ostream& ostr, const std::string& uri, const std::string& text, const std::string& target, std::ostream* pSstr)
{
if (_noFrames && target != "_blank")
ostr << "" << text << "";
@@ -2126,6 +2221,7 @@ void DocWriter::writeTargetLink(std::ostream& ostr, const std::string& uri, cons
ostr << "" << text << "";
else
ostr << "" << htmlize(text) << "";
+ if (pSstr) *pSstr << text;
}
@@ -2311,6 +2407,7 @@ void DocWriter::writePage(Page& page)
std::string path(pathFor(page.fileName));
std::ofstream ostr(path.c_str());
+ std::ostringstream sstr;
if (!ostr.good()) throw Poco::CreateFileException(path);
writeHeader(ostr, title, "js/iframeResizer.min.js");
writeTitle(ostr, tr(category), title);
@@ -2321,12 +2418,13 @@ void DocWriter::writePage(Page& page)
{
writeTOC(ostr, toc);
}
- writeDescription(ostr, text);
+ writeDescription(ostr, text, &sstr);
writeCopyright(ostr);
endContent(ostr);
endBody(ostr);
ostr << "" << std::endl;
writeFooter(ostr);
+ if (_searchIndex) writeSearchIndex(page.fileName, sstr.str());
}
diff --git a/PocoDoc/src/DocWriter.h b/PocoDoc/src/DocWriter.h
index 56bc16ecf..af2ee12e9 100644
--- a/PocoDoc/src/DocWriter.h
+++ b/PocoDoc/src/DocWriter.h
@@ -42,7 +42,7 @@ class DocWriter
/// to a directory.
{
public:
- DocWriter(const Poco::CppParser::NameSpace::SymbolTable& symbols, const std::string& path, bool prettifyCode = true, bool noFrames = false);
+ DocWriter(const Poco::CppParser::NameSpace::SymbolTable& symbols, const std::string& path, bool prettifyCode = true, bool noFrames = false, bool searchIndex = false);
/// Creates the DocWriter.
~DocWriter();
@@ -56,6 +56,9 @@ public:
void addPage(const std::string& path);
/// Adds a page.
+
+ static const std::string DATABASE_DIR;
+ static const std::string DATABASE_NAME;
protected:
enum TextState
@@ -100,6 +103,10 @@ protected:
typedef std::map StringMap;
typedef std::map PageMap;
+ void initDatabase();
+ void writeSearchIndex(std::string link, std::string content);
+ static void writeSearchBox(std::ostream& ostr);
+
void writePages();
void writePage(Page& page);
void scanTOC(const std::string& text, TOC& toc);
@@ -134,18 +141,18 @@ protected:
static void endBody(std::ostream& ostr);
static void beginContent(std::ostream& ostr);
static void endContent(std::ostream& ostr);
- void writeDescription(std::ostream& ostr, const std::string& text);
- void writeDescriptionLine(std::ostream& ostr, const std::string& text, TextState& state);
+ void writeDescription(std::ostream& ostr, const std::string& text, std::ostream* pSstr = nullptr);
+ void writeDescriptionLine(std::ostream& ostr, const std::string& text, TextState& state, std::ostream* pSstr = nullptr);
void writeSummary(std::ostream& ostr, const std::string& text, const std::string& uri);
static std::string htmlize(const std::string& str);
static std::string htmlize(char c);
static TextState analyzeLine(const std::string& line);
static std::string htmlizeName(const std::string& name);
- void writeText(std::ostream& ostr, const std::string& text);
- void writeText(std::ostream& ostr, std::string::const_iterator begin, const std::string::const_iterator& end);
+ void writeText(std::ostream& ostr, const std::string& text, std::ostream* pSstr = nullptr);
+ void writeText(std::ostream& ostr, std::string::const_iterator begin, const std::string::const_iterator& end, std::ostream* pSstr = nullptr);
void writeDecl(std::ostream& ostr, const std::string& decl);
void writeDecl(std::ostream& ostr, std::string::const_iterator begin, const std::string::const_iterator& end);
- bool writeSymbol(std::ostream& ostr, std::string& token, std::string::const_iterator& begin, const std::string::const_iterator& end);
+ bool writeSymbol(std::ostream& ostr, std::string& token, std::string::const_iterator& begin, const std::string::const_iterator& end, std::ostream* pSstr = nullptr);
bool writeSpecial(std::ostream& ostr, std::string& token, std::string::const_iterator& begin, const std::string::const_iterator& end);
void nextToken(std::string::const_iterator& it, const std::string::const_iterator& end, std::string& token);
void writeListItem(std::ostream& ostr, const std::string& text);
@@ -155,31 +162,31 @@ protected:
void writeInheritance(std::ostream& ostr, const Poco::CppParser::Struct* pStruct);
void writeMethodSummary(std::ostream& ostr, const Poco::CppParser::Struct* pStruct);
void writeNestedClasses(std::ostream& ostr, const Poco::CppParser::Struct* pStruct);
- void writeNameSpacesSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
- void writeNameSpaces(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
- void writeClassesSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
- void writeClasses(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
+ void writeNameSpacesSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace, std::ostream* pSstr = nullptr);
+ void writeNameSpaces(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace, std::ostream* pSstr = nullptr);
+ void writeClassesSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace, std::ostream* pSstr = nullptr);
+ void writeClasses(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace, std::ostream* pSstr = nullptr);
void writeClassSummary(std::ostream& ostr, const Poco::CppParser::Struct* pStruct);
- void writeTypesSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
- void writeAliasesSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
- void writeTypes(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
- void writeAliases(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
- void writeType(std::ostream& ostr, const Poco::CppParser::TypeDef* pType);
- void writeEnums(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
- void writeEnum(std::ostream& ostr, const Poco::CppParser::Enum* pEnum);
+ void writeTypesSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace, std::ostream* pSstr = nullptr);
+ void writeAliasesSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace, std::ostream* pSstr = nullptr);
+ void writeTypes(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace, std::ostream* pSstr = nullptr);
+ void writeAliases(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace, std::ostream* pSstr = nullptr);
+ void writeType(std::ostream& ostr, const Poco::CppParser::TypeDef* pType, std::ostream* pSstr = nullptr);
+ void writeEnums(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace, std::ostream* pSstr = nullptr);
+ void writeEnum(std::ostream& ostr, const Poco::CppParser::Enum* pEnum, std::ostream* pSstr);
void writeConstructors(std::ostream& ostr, const Poco::CppParser::Struct* pStruct);
void writeDestructor(std::ostream& ostr, const Poco::CppParser::Struct* pStruct);
void writeMethods(std::ostream& ostr, const Poco::CppParser::Struct* pNameSpace);
- void writeFunctionsSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
- void writeFunctions(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
- void writeFunction(std::ostream& ostr, const Poco::CppParser::Function* pFunc);
- void writeVariables(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace);
- void writeVariable(std::ostream& ostr, const Poco::CppParser::Variable* pVar);
+ void writeFunctionsSummary(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace, std::ostream* pSstr = nullptr);
+ void writeFunctions(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace, std::ostream* pSstr = nullptr);
+ void writeFunction(std::ostream& ostr, const Poco::CppParser::Function* pFunc, std::ostream* pSstr = nullptr);
+ void writeVariables(std::ostream& ostr, const Poco::CppParser::NameSpace* pNameSpace, std::ostream* pSstr = nullptr);
+ void writeVariable(std::ostream& ostr, const Poco::CppParser::Variable* pVar, std::ostream* pSstr = nullptr);
static void writeNameListItem(std::ostream& ostr, const std::string& name, const Poco::CppParser::Symbol* pSymbol, const Poco::CppParser::NameSpace* pNameSpace, bool& first);
static void writeLink(std::ostream& ostr, const std::string& uri, const std::string& text);
- static void writeLink(std::ostream& ostr, const Poco::CppParser::Symbol* pSymbol, const std::string& text);
+ static void writeLink(std::ostream& ostr, const Poco::CppParser::Symbol* pSymbol, const std::string& text, std::ostream* pSstr = nullptr);
static void writeLink(std::ostream& ostr, const std::string& uri, const std::string& text, const std::string& linkClass);
- void writeTargetLink(std::ostream& ostr, const std::string& uri, const std::string& text, const std::string& target);
+ void writeTargetLink(std::ostream& ostr, const std::string& uri, const std::string& text, const std::string& target, std::ostream* pSstr = nullptr);
static void writeImageLink(std::ostream& ostr, const std::string& uri, const std::string& image, const std::string& alt);
static void writeImage(std::ostream& ostr, const std::string& uri, const std::string& caption);
static void writeIcon(std::ostream& ostr, const std::string& icon);
@@ -212,6 +219,7 @@ private:
bool _pendingLine;
int _indent;
int _titleId;
+ bool _searchIndex;
static std::string _language;
static StringMap _strings;
diff --git a/PocoDoc/src/PocoDoc.cpp b/PocoDoc/src/PocoDoc.cpp
index 05fe0959d..3e9bbbc94 100644
--- a/PocoDoc/src/PocoDoc.cpp
+++ b/PocoDoc/src/PocoDoc.cpp
@@ -113,7 +113,8 @@ class PocoDocApp: public Application
public:
PocoDocApp():
_helpRequested(false),
- _writeEclipseTOC(false)
+ _writeEclipseTOC(false),
+ _searchIndexEnabled(false)
{
std::setlocale(LC_ALL, "");
}
@@ -168,6 +169,12 @@ protected:
.required(false)
.repeatable(false)
.callback(OptionCallback(this, &PocoDocApp::handleEclipse)));
+
+ options.addOption(
+ Option("search-index", "s", "Enable search index (requires FTS5 support).")
+ .required(false)
+ .repeatable(false)
+ .callback(OptionCallback(this, &PocoDocApp::handleSearchIndex)));
}
void handleHelp(const std::string& name, const std::string& value)
@@ -201,6 +208,11 @@ protected:
_writeEclipseTOC = true;
}
+ void handleSearchIndex(const std::string& name, const std::string& value)
+ {
+ _searchIndexEnabled = true;
+ }
+
void handleConfig(const std::string& name, const std::string& value)
{
loadConfiguration(value, -200);
@@ -233,7 +245,7 @@ protected:
for (StringTokenizer::Iterator itg = excTokenizer.begin(); itg != excTokenizer.end(); ++itg)
{
Glob glob(*itg);
- if (glob.match(p.getFileName()))
+ if (glob.match(p.getFileName()) || glob.match(p.toString()))
include = false;
}
if (include)
@@ -321,11 +333,6 @@ protected:
logger().log(exc);
++errors;
}
- catch (std::exception& exc)
- {
- logger().error(std::string(exc.what()));
- ++errors;
- }
}
return errors;
}
@@ -351,7 +358,21 @@ protected:
File file(path);
file.createDirectories();
- DocWriter writer(_gst, path.toString(), config().getBool("PocoDoc.prettifyCode", false), _writeEclipseTOC);
+ if (_searchIndexEnabled || config().getBool("PocoDoc.searchIndex", false))
+ {
+#if defined(POCO_ENABLE_SQLITE_FTS5)
+ std::string dbDirectory = path.toString() + DocWriter::DATABASE_DIR;
+ Path dbPath(dbDirectory);
+ dbPath.makeDirectory();
+ File dbFile(dbPath);
+ dbFile.createDirectories();
+ _searchIndexEnabled = true;
+#else
+ logger().error("FTS5 is not enabled, search is not supported");
+#endif
+ }
+
+ DocWriter writer(_gst, path.toString(), config().getBool("PocoDoc.prettifyCode", false), _writeEclipseTOC, _searchIndexEnabled);
if (config().hasProperty("PocoDoc.pages"))
{
@@ -520,6 +541,7 @@ protected:
private:
bool _helpRequested;
bool _writeEclipseTOC;
+ bool _searchIndexEnabled;
Poco::CppParser::NameSpace::SymbolTable _gst;
};
diff --git a/ProGen/ProGen_vs170.vcxproj b/ProGen/ProGen_vs170.vcxproj
index 865d38391..ee6dfd96d 100644
--- a/ProGen/ProGen_vs170.vcxproj
+++ b/ProGen/ProGen_vs170.vcxproj
@@ -981,4 +981,4 @@
-
+
\ No newline at end of file
diff --git a/configure b/configure
index c3bb3e204..056ed2c93 100755
--- a/configure
+++ b/configure
@@ -86,7 +86,7 @@ $(ls -C "$base"/build/config/)
Compile with -DPOCO_DATA_SQL_SERVER_BIG_STRINGS=1
Enables strings over 8000 bytes on MS SQL Server.
- --sqlite-fts=
+ --sqlite-fts
Compile with -DPOCO_DATA_SQLITE_FTS.
Compile SQLite with Full Text Search support.
@@ -276,7 +276,7 @@ while [ $# -ge 1 ]; do
flags="$flags -DSQLITE_THREADSAFE=$(echo "${1}" | awk '{print substr($0,22)}')" ;;
--sqlite-fts)
- flags="$flags -DSQLITE_ENABLE_FTS5 -DSQLITE_ENABLE_FTS3_PARENTHESIS" ;;
+ flags="$flags -DSQLITE_ENABLE_FTS5" ;;
--poquito)
flags="$flags -DPOCO_NO_FILECHANNEL -DPOCO_NO_SPLITTERCHANNEL -DPOCO_NO_SYSLOGCHANNEL -DPOCO_UTIL_NO_INIFILECONFIGURATION -DPOCO_UTIL_NO_JSONCONFIGURATION -DPOCO_UTIL_NO_XMLCONFIGURATION" ;;