Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-internal-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ jobs:
steps:
- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.30.0" # <--= optional, use most recent 3.25.x version
ninjaVersion: "^1.11.1" # <--= optional, use most recent 1.x version
cmakeVersion: "~3.31.0"
ninjaVersion: "^1.13.0"
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup MSVC
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ jobs:
- uses: lukka/get-cmake@latest
if: matrix.build.os != 'windows-2025-vs2026'
with:
cmakeVersion: "~3.30.0" # <--= optional, use most recent 3.25.x version
ninjaVersion: "^1.11.1" # <--= optional, use most recent 1.x version
cmakeVersion: "~3.31.0" # <--= optional, use most recent 3.25.x version
ninjaVersion: "^1.13.1" # <--= optional, use most recent 1.x version

- uses: lukka/get-cmake@latest
if: matrix.build.os == 'windows-2025-vs2026'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
version: "1.16.1"
- uses: lukka/get-cmake@latest
with:
cmakeVersion: "~3.30.0" # <--= optional, use most recent 3.25.x version
ninjaVersion: "^1.11.1" # <--= optional, use most recent 1.x version
cmakeVersion: "~3.31.0"
ninjaVersion: "^1.13.1"
- name: Checkout
uses: actions/checkout@v6
- name: Install lcov
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.29)
cmake_minimum_required(VERSION 3.31)


set(sl3_MAJOR_VERSION 1)
Expand Down
2 changes: 1 addition & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 8,
"version": 10,
"include": [
"cmake/preset/ninja.json",
"cmake/preset/xcode.json",
Expand Down
8 changes: 3 additions & 5 deletions CMakeUserPresetsExample.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"version": 8,
"version": 10,
"include": [
"cmake/preset/ninja.json"

] ,
],
"configurePresets": [
{
"name": "memsan",
Expand Down Expand Up @@ -43,5 +42,4 @@
"configurePreset": "memsan"
}
]
}

}
9 changes: 6 additions & 3 deletions cmake/add-on/coverage-gcov.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,23 @@ if(NOT GCOV)
message(FATAL_ERROR "gcov tool not found for GCC version ${GCC_MAJOR_VERSION}")
endif()

set(COVERAGE_BRANCHES "--rc branch_coverage=1")
set(COVERAGE_BRANCHES "--rc branch_coverage=1 --rc no_exception_branch=1")
# these warnings are ridiculous, they depend on the lcov genhtml version
set(COVERAGE_WARNINGS "--ignore-errors gcov --ignore-errors mismatch --ignore-errors unused")
set(COVERAGE_FILTERS "--filter region,branch_region")

set(GENHTML_WARNINGS "")

set(COVERAGE_TOOL "lcov")

separate_arguments(COVERAGE_FILTERS)
separate_arguments(COVERAGE_BRANCHES)
separate_arguments(COVERAGE_WARNINGS)
separate_arguments(GENHTML_WARNINGS)
add_custom_target(coverage
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/coverage
COMMAND lcov --directory . --capture --output-file ${CMAKE_BINARY_DIR}/coverage/coverage.info ${COVERAGE_WARNINGS} ${COVERAGE_BRANCHES}
COMMAND lcov --remove ${CMAKE_BINARY_DIR}/coverage/coverage.info '/usr/*' '*/tests/*' '*/vcpkg_installed/*' '${CMAKE_BINARY_DIR}/_deps/*' '${CMAKE_SOURCE_DIR}/external/*' --output-file ${CMAKE_BINARY_DIR}/coverage/coverage.info.cleaned ${COVERAGE_WARNINGS} ${COVERAGE_BRANCHES}
COMMAND lcov --directory . --capture --output-file ${CMAKE_BINARY_DIR}/coverage/coverage.info ${COVERAGE_WARNINGS} ${COVERAGE_BRANCHES} ${COVERAGE_FILTERS}
COMMAND lcov --remove ${CMAKE_BINARY_DIR}/coverage/coverage.info '/usr/*' '*/tests/*' '*/vcpkg_installed/*' '${CMAKE_BINARY_DIR}/_deps/*' '${CMAKE_SOURCE_DIR}/external/*' --output-file ${CMAKE_BINARY_DIR}/coverage/coverage.info.cleaned ${COVERAGE_WARNINGS} ${COVERAGE_BRANCHES} ${COVERAGE_FILTERS}
COMMAND genhtml --branch-coverage ${CMAKE_BINARY_DIR}/coverage/coverage.info.cleaned --output-directory ${CMAKE_BINARY_DIR}/coverage ${GENHTML_WARNINGS} ${COVERAGE_BRANCHES}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
)
Expand Down
1 change: 1 addition & 0 deletions cmake/lib/sl3Config.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

@PACKAGE_INIT@

include(CMakeFindDependencyMacro)
Expand Down
7 changes: 3 additions & 4 deletions cmake/preset/base.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 8,
"version": 10,
"configurePresets": [
{
"name": "base",
Expand All @@ -13,8 +13,7 @@
"CMAKE_MODULE_PATH": "${sourceDir}/cmake",
"CMAKE_PROJECT_INCLUDE": "project-setup"
},
"environment": {
}
"environment": {}
}
],
"testPresets": [
Expand All @@ -31,4 +30,4 @@
}
}
]
}
}
22 changes: 20 additions & 2 deletions cmake/preset/docgen.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 8,
"version": 10,
"include": [
"base.json"
],
Expand All @@ -10,7 +10,7 @@
"generator": "Ninja",
"cacheVariables": {
"CMAKE_COMPILE_WARNING_AS_ERROR": "OFF",
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_BUILD_TYPE": "None",
"sl3_USE_COMMON_COMPILER_WARNINGS": "OFF",
"sl3_USE_INTERNAL_SQLITE3": "OFF",
"PROJECT_ADDONS": "add-on/fetch-dependencies;add-on/coverage-gcov"
Expand All @@ -21,6 +21,16 @@
{
"name": "docgen",
"configurePreset": "docgen"
},
{
"name": "docgen-doc",
"configurePreset": "docgen",
"targets": "doc"
},
{
"name": "docgen-coverage",
"configurePreset": "docgen",
"targets": "coverage"
}
],
"testPresets": [
Expand All @@ -45,6 +55,14 @@
{
"type": "test",
"name": "docgen"
},
{
"type": "build",
"name": "docgen-doc"
},
{
"type": "build",
"name": "docgen-coverage"
}
]
}
Expand Down
8 changes: 5 additions & 3 deletions cmake/preset/msvc22.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"version": 8,
"include": ["base.json"],
"version": 10,
"include": [
"base.json"
],
"configurePresets": [
{
"name": "msvc22",
Expand Down Expand Up @@ -56,4 +58,4 @@
]
}
]
}
}
2 changes: 1 addition & 1 deletion cmake/preset/msvc26.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 8,
"version": 10,
"include": [
"base.json"
],
Expand Down
8 changes: 5 additions & 3 deletions cmake/preset/ninja.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"version": 8,
"include": ["base.json"],
"version": 10,
"include": [
"base.json"
],
"configurePresets": [
{
"name": "ninja",
Expand Down Expand Up @@ -50,4 +52,4 @@
]
}
]
}
}
8 changes: 5 additions & 3 deletions cmake/preset/xcode.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"version": 8,
"include": ["base.json"],
"version": 10,
"include": [
"base.json"
],
"configurePresets": [
{
"name": "xcode",
Expand Down Expand Up @@ -51,4 +53,4 @@
]
}
]
}
}
10 changes: 5 additions & 5 deletions include/sl3/columns.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace sl3
// index access always checked, since docs say
// 'if the column index is out of range, the result is undefined'
// but if you feel like pre-optimization is required,
// feel free to access the underlying sqlite3_stmt via
// feel free to access the underlying sqlite3_stmt
// and adopt the index access!

/**
Expand All @@ -40,10 +40,10 @@ namespace sl3

Columns (sqlite3_stmt* stmt);

// not be needed, even if they would not harm ..
// should not be needed, even if they would not harm
Columns& operator= (const Columns&) = delete;

// not be needed, even if they would not harm ..
// should not be needed, even if they would not harm
Columns& operator= (Columns&&) = delete;

Columns (const Columns&) = default;
Expand Down Expand Up @@ -140,7 +140,7 @@ namespace sl3
* If used, should be called before accessing the value of the column
* at the given index, otherwise the typed access might set the type.
*
* This method can be used to check if a column isNull.
* This method can be used to check if a column is null.
*
* \param idx wanted index
* \throw sl3::ErrOutOfRange if idx is invalid
Expand Down Expand Up @@ -221,7 +221,7 @@ namespace sl3
/**
* \brief Get the underlying sqlite3_stmt
*
* User defined QueryCallbacks might have their own way to do things,
* User-defined query callbacks might have their own way to do things,
* so this getter provides access to the underlying sqlite3_stmt.
*
* \return underlying sqlite3_stmt
Expand Down
4 changes: 4 additions & 0 deletions include/sl3/command.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ namespace sl3
DbValues _parameters;
};

// Branch coverage for that is a nightmare,
// cant come over 60% with all the boilerplate in commandsexttest.cpp
// LCOV_EXCL_BR_START
/**
* \brief Syntax sugar to create command parameters
*
Expand All @@ -259,6 +262,7 @@ namespace sl3
{
return {DbValue{vals}...};
}
// LCOV_EXCL_BR_STOP
}

#endif
15 changes: 8 additions & 7 deletions include/sl3/database.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace sl3
}

/**
* \brief represents a SQLite3 Database
* \brief Represents a SQLite3 database
*
*
* Encapsulates some of the most useful methods for a SQLite3 database
Expand Down Expand Up @@ -83,7 +83,7 @@ namespace sl3
Database (Database&&) noexcept;

/**
* \brief create a SqlCommand instance.
* \brief Create an SQL command instance.
*
* Parameters that the statement might contain will be automatically
* deduced and created as DbVariant values
Expand All @@ -94,7 +94,7 @@ namespace sl3
Command prepare (const std::string& sql);

/**
* \brief create a Command.
* \brief Create a Command.
*
* Given parameters will be used to set up the command parameters,
*
Expand Down Expand Up @@ -236,11 +236,12 @@ namespace sl3
std::string getMostRecentErrMsg ();

/**
* \brief Returns number of row that have changed since database opening.
* \brief Returns the number of rows that have changed since the database
* was opened.
*
* Returns the number of rows that have been changed
* Through successful SQL INSERT/UPDATE or DELETE statements since database
* was opened.
* through successful SQL INSERT/UPDATE or DELETE statements since the
* database was opened.
*
* \return Count of changed rows
*/
Expand All @@ -257,7 +258,7 @@ namespace sl3
std::size_t getRecentlyChanged ();

/**
* \brief returns rowid of the most recent successful INSERT statement
* \brief Returns the rowid of the most recent successful INSERT statement
*
* Returns the rowid (ROWID, OID, or _ROWID_ or the column of
* type INTEGER PRIMARY KEY )
Expand Down
Loading
Loading