{"id":13421052,"url":"https://github.com/SRombauts/SQLiteCpp","last_synced_at":"2025-03-15T07:32:29.713Z","repository":{"id":2986090,"uuid":"4002222","full_name":"SRombauts/SQLiteCpp","owner":"SRombauts","description":"SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.","archived":false,"fork":false,"pushed_at":"2024-09-07T14:24:10.000Z","size":17688,"stargazers_count":2204,"open_issues_count":69,"forks_count":510,"subscribers_count":81,"default_branch":"master","last_synced_at":"2024-10-06T20:05:45.227Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://srombauts.github.io/SQLiteCpp","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SRombauts.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-04-12T07:09:52.000Z","updated_at":"2024-10-03T10:06:35.000Z","dependencies_parsed_at":"2024-01-31T09:03:42.543Z","dependency_job_id":"def5b406-f4a1-4621-8e8c-7bb5ac253688","html_url":"https://github.com/SRombauts/SQLiteCpp","commit_stats":{"total_commits":721,"total_committers":98,"mean_commits":7.357142857142857,"dds":"0.35783633841886264","last_synced_commit":"39070b2326f79596afaf425a9125a12d715b323c"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRombauts%2FSQLiteCpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRombauts%2FSQLiteCpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRombauts%2FSQLiteCpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SRombauts%2FSQLiteCpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SRombauts","download_url":"https://codeload.github.com/SRombauts/SQLiteCpp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243104055,"owners_count":20236944,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T22:01:47.662Z","updated_at":"2025-03-15T07:32:29.705Z","avatar_url":"https://github.com/SRombauts.png","language":"C","readme":"SQLiteC++\r\n---------\r\n\r\n[![release](https://img.shields.io/github/release/SRombauts/SQLiteCpp.svg)](https://github.com/SRombauts/SQLiteCpp/releases)\r\n[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/SRombauts/SQLiteCpp/blob/master/LICENSE.txt)\r\n[![Travis CI Linux Build Status](https://travis-ci.org/SRombauts/SQLiteCpp.svg?branch=master)](https://travis-ci.org/SRombauts/SQLiteCpp \"Travis CI Linux Build Status\")\r\n[![AppVeyor Windows Build status](https://ci.appveyor.com/api/projects/status/github/SRombauts/SQLiteCpp?svg=true)](https://ci.appveyor.com/project/SbastienRombauts/SQLiteCpp \"AppVeyor Windows Build status\")\r\n[![GitHub Actions Build status](https://github.com/SRombauts/SQLiteCpp/workflows/build/badge.svg)](https://github.com/SRombauts/SQLiteCpp/actions \"GitHhub Actions Build status\")\r\n[![Coveralls](https://img.shields.io/coveralls/SRombauts/SQLiteCpp.svg)](https://coveralls.io/github/SRombauts/SQLiteCpp \"Coveralls test coverage\")\r\n[![Coverity](https://img.shields.io/coverity/scan/14508.svg)](https://scan.coverity.com/projects/srombauts-sqlitecpp \"Coverity Scan Build Status\")\r\n[![Join the chat at https://gitter.im/SRombauts/SQLiteCpp](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/SRombauts/SQLiteCpp?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\r\n\r\nSQLiteC++ (SQLiteCpp) is a lean and easy to use C++ SQLite3 wrapper.\r\n\r\n\u003c!--Keywords: sqlite, sqlite3, C, library, wrapper C++--\u003e\r\n\u003cmeta name=\"keywords\" content=\"sqlite, sqlite3, C, library, wrapper C++\"\u003e\r\n\r\n## About SQLiteC++:\r\n\r\nSQLiteC++ offers an encapsulation around the native C APIs of SQLite,\r\nwith a few intuitive and well documented C++ classes.\r\n\r\n### License:\r\n\r\nCopyright (c) 2012-2024 Sébastien Rombauts (sebastien.rombauts@gmail.com)\r\n\u003ca href=\"https://www.paypal.me/SRombauts\" title=\"Pay Me a Beer! Donate with PayPal :)\"\u003e\u003cimg src=\"https://www.paypalobjects.com/webstatic/paypalme/images/pp_logo_small.png\" width=\"118\"\u003e\u003c/a\u003e\r\n\r\nDistributed under the MIT License (MIT) (See accompanying file LICENSE.txt\r\nor copy at http://opensource.org/licenses/MIT)\r\n\r\n#### Note on redistribution of SQLite source files\r\n\r\nAs stated by the MIT License, you are welcome to reuse, modify, and redistribute the SQLiteCpp source code\r\nthe way you want it to, be it a git submodule, a subdirectory, or a selection of some source files.\r\n\r\nI would love a mention in your README, a web link to the SQLite repository, and a mention of the author,\r\nbut none of those are mandatory.\r\n\r\n### About SQLite underlying library:\r\n\r\nSQLite is a library that implements a serverless transactional SQL database engine.\r\nIt is the most widely deployed SQL database engine in the world.\r\nAll of the code and documentation in SQLite has been dedicated to the public domain by the authors.\r\n[http://www.sqlite.org/about.html](http://www.sqlite.org/about.html)\r\n\r\n### The goals of SQLiteC++ are:\r\n\r\n- to offer the best of the existing simple C++ SQLite wrappers\r\n- to be elegantly written with good C++11 design, STL, exceptions and RAII idiom\r\n- to keep dependencies to a minimum (C++11 STL and SQLite3)\r\n- to be portable\r\n- to be light and fast\r\n- to be thread-safe only as much as SQLite \"Multi-thread\" mode (see below)\r\n- to have a good unit test coverage\r\n- to use API names sticking with those of the SQLite library\r\n- to be well documented with Doxygen tags, and with some good examples\r\n- to be well maintained\r\n- to use a permissive MIT license, similar to BSD or Boost, for proprietary/commercial usage\r\n\r\nIt is designed using the Resource Acquisition Is Initialization (RAII) idiom\r\n(see [http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization](http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization)),\r\nand throwing exceptions in case of SQLite errors (except in destructors,\r\nwhere assert() are used instead).\r\nEach SQLiteC++ object must be constructed with a valid SQLite database connection,\r\nand then is always valid until destroyed.\r\n\r\n### Supported platforms:\r\n\r\nNow requires a C++11 compiler. Use branch [sqlitecpp-2.x](https://github.com/SRombauts/SQLiteCpp/tree/sqlitecpp-2.x) for latest pre-C++11 developments.\r\n\r\nDevelopments and tests are done under the following OSs:\r\n- Ubuntu 14.04, 16.04 and 18.04 (Travis CI and Github Actions)\r\n- Windows 10, and Windows Server 2012 R2, Windows Server 2016, Windows Server 2022 (AppVeyor and Github Actions)\r\n- MacOS 10.11 and 11.7 (Travis CI and Github Actions)\r\n- Valgrind memcheck tool\r\n\r\nAnd the following IDEs/Compilers\r\n- GCC 4.8.4, 5.3.0, 7.1.1 and latest eg 9.4 (C++11, C++14, C++17)\r\n- Clang 5 and 7 (Travis CI)\r\n- AppleClang 8, 9 and 13 (Travis CI and Github Actions)\r\n- Xcode 8 \u0026 9 (Travis CI)\r\n- Visual Studio Community/Entreprise 2022, 2019, 2017, and 2015 (AppVeyor and Github Actions)\r\n\r\n### Dependencies\r\n\r\n- a modern C++11 STL implementation with GCC, Clang, or Visual Studio 2015\r\n- exception support (the class Exception inherits from std::runtime_error)\r\n- the SQLite library (3.7.15 minimum from 2012-12-12) either by linking to it dynamically or statically (install the libsqlite3-dev package under Debian/Ubuntu/Mint Linux),\r\n  or by adding its source file in your project code base (source code provided in src/sqlite3 for Windows),\r\n  with the `SQLITE_ENABLE_COLUMN_METADATA` macro defined (see http://www.sqlite.org/compile.html#enable_column_metadata).\r\n\r\n## Getting started\r\n### Installation\r\n\r\nTo use this wrapper, you need to add the SQLiteC++ source files from the src/ directory\r\nin your project code base, and compile/link against the sqlite library.\r\n\r\nThe easiest way to do this is to add the wrapper as a library.\r\nThe \"CMakeLists.txt\" file defining the static library is provided in the root directory,\r\nso you simply have to add_subdirectory(SQLiteCpp) to you main CMakeLists.txt\r\nand link to the \"SQLiteCpp\" wrapper library.\r\n\r\nExample for Linux: \r\n```cmake\r\nadd_subdirectory(${CMAKE_CURRENT_LIST_DIR}/thirdparty/SQLiteCpp)\r\n\r\nadd_executable(main src/main.cpp)\r\ntarget_link_libraries(main\r\n  SQLiteCpp\r\n  sqlite3\r\n  pthread\r\n  dl\r\n  )\r\n``` \r\nThus this SQLiteCpp repository can be directly used as a Git submodule.\r\nSee the [SQLiteCpp_Example](https://github.com/SRombauts/SQLiteCpp_Example) side repository for a standalone \"from scratch\" example.\r\n\r\nUnder Debian/Ubuntu/Mint Linux, you can install the libsqlite3-dev package if you don't want to use the embedded sqlite3 library.\r\n\r\n### Building example and unit-tests:\r\n\r\nUse git to clone the repository. Then init and update submodule \"googletest\".\r\n\r\n```Shell\r\ngit clone https://github.com/SRombauts/SQLiteCpp.git\r\ncd SQLiteCpp\r\ngit submodule init\r\ngit submodule update\r\n```\r\n\r\n### Installing SQLiteCpp (vcpkg)\r\n\r\nAlternatively, you can build and install SQLiteCpp using [vcpkg](https://github.com/Microsoft/vcpkg/) dependency manager:\r\n\r\n```bash or powershell\r\ngit clone https://github.com/Microsoft/vcpkg.git\r\ncd vcpkg\r\n./bootstrap-vcpkg.sh\r\n./vcpkg integrate install\r\n./vcpkg install sqlitecpp\r\n```\r\n\r\nThe SQLiteCpp port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.\r\n\r\n\r\n#### Using SQLiteCpp on a system-wide installation\r\n\r\nIf you installed this package to your system, a `SQLiteCppConfig.cmake` file will be generated \u0026 installed to your system.  \r\nThis file lets you link against the SQLiteCpp library for use in your Cmake project.\r\n\r\nHere's an example of using this in your CMakeLists.txt\r\n```cmake\r\n# You can optionally define a minimum version in this call\r\nfind_package(SQLiteCpp REQUIRED)\r\n# For this example, lets say you created an target with add_executable (or add_library) called \"my_target\"\r\n# You can optionally declare PUBLIC or PRIVATE linkage here, depending on your needs.\r\ntarget_link_libraries(my_target PRIVATE SQLiteCpp)\r\n```\r\n\r\n#### CMake and tests\r\nA CMake configuration file is also provided for multi-platform support and testing.\r\n\r\nTypical generic build for MS Visual Studio under Windows (from [build.bat](build.bat)):\r\n\r\n```Batchfile\r\nmkdir build\r\ncd build\r\n\r\ncmake ..        # cmake .. -G \"Visual Studio 16 2019\"    # for Visual Studio 2019\r\n@REM Generate a Visual Studio solution for latest version found\r\ncmake -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON ..\r\n\r\n@REM Build default configuration (ie 'Debug')\r\ncmake --build .\r\n\r\n@REM Build and run tests\r\nctest --output-on-failure\r\n```\r\n\r\nGenerating the Linux Makefile, building in Debug and executing the tests (from [build.sh](build.sh)):\r\n\r\n```Shell\r\nmkdir Debug\r\ncd Debug\r\n\r\n# Generate a Makefile for GCC (or Clang, depanding on CC/CXX envvar)\r\ncmake -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON ..\r\n\r\n# Build (ie 'make')\r\ncmake --build .\r\n\r\n# Build and run unit-tests (ie 'make test')\r\nctest --output-on-failure\r\n```\r\n\r\n#### Building with meson\r\n\r\nYou can build SQLiteCpp with [meson](https://mesonbuild.com/) using the provided meson project.\r\n\r\nyou can install meson using pip: `pip install meson` however you may need to install ninja and other dependencies depending on your platform as an compiler toolchain\r\n\r\nArch Linux:\r\n\r\n```sh\r\n# install clang (compiler toolchain) and ninja (recommended build system)\r\nsudo pacman -Syu clang ninja\r\n# install python and pip (required for meson)\r\nsudo pacman -Syu python python-pip\r\n# install meson \r\npip install meson\r\n```\r\n\r\nUbuntu:\r\n\r\n```sh\r\n# install gcc(compiler toolchain) and ninja (recommended build system)\r\nsudo apt install build-essential ninja-build\r\n# install python and pip (required for meson)\r\nsudo apt install python3 python3-pip\r\n# install meson\r\npip install meson\r\n```\r\n\r\nfor example you can build the library using the default options with:\r\n\r\n```sh\r\n# setup the build directory\r\nmeson setup builddir \r\n# build sqlitecpp\r\nmeson compile -C builddir\r\n```\r\n\r\nor if you wish to build with tests and examples:\r\n\r\n```sh\r\n# setup the build directory with tests and examples enabled\r\nmeson setup builddir -DSQLITECPP_BUILD_TESTS=true -DSQLITECPP_BUILD_EXAMPLES=true\r\n# build sqlitecpp\r\nmeson compile -C builddir\r\n```\r\n\r\n#### Using SQLiteCpp as subproject in meson\r\n\r\nplease check the examples in the examples folder for usage of SQLiteCpp as a subproject in meson, as for the wrap file you can use the one provided in the subprojects folder called `SQLiteCpp.wrap`\r\n\r\n\u003e keep in mind that even that this wrap should be up to date, it is recommended to check the latest version of SQLiteCpp and update the wrap file accordingly\r\n\r\n#### System SQLiteCpp support under meson\r\n\r\nadditionally meson can detect and use the bundled sqlitecpp library included on your system if available, for example with vcpkg you would need to set the `PKG_CONFIG_PATH` environment variable to the vcpkg directory before running meson setup, and if applies the corresponding `PKG-CONFIG` executable to the path.\r\n\r\n#### Building the Doxygen/html documentation\r\n\r\nMake sure you have Dogygen installed and configure CMake using the `SQLITECPP_RUN_DOXYGEN=ON` flag:\r\n\r\n```\r\ncmake -DSQLITECPP_RUN_DOXYGEN=ON   \u003cMORE ARGUMENTS_HERE\u003e\r\n```\r\n\r\nand then execute the `SQLiteCpp_doxygen` target (or build all targets, see above).\r\nThe documentation will be generated in the 'doc' subfolder of the source tree.\r\n\r\n#### CMake options\r\n\r\n  * For more options on customizing the build, see the [CMakeLists.txt](https://github.com/SRombauts/SQLiteCpp/blob/master/CMakeLists.txt) file.\r\n\r\n#### Troubleshooting\r\n\r\nUnder Linux, if you get multiple linker errors like \"undefined reference to sqlite3_xxx\",\r\nit's that you lack the \"sqlite3\" library: install the libsqlite3-dev package.\r\n\r\nIf you get a single linker error \"Column.cpp: undefined reference to sqlite3_column_origin_name\",\r\nit's that your \"sqlite3\" library was not compiled with\r\nthe `SQLITE_ENABLE_COLUMN_METADATA` macro defined (see [http://www.sqlite.org/compile.html#enable_column_metadata](http://www.sqlite.org/compile.html#enable_column_metadata)).\r\nYou can:\r\n - either recompile the sqlite3 library provided by your distribution yourself (seek help online)\r\n - or turn off the `option(SQLITE_ENABLE_COLUMN_METADATA \"Enable Column::getColumnOriginName(). Require support from sqlite3 library.\" ON)` in [CMakeFiles.txt](CMakeFiles.txt) (or other build system scripts)\r\n - or turn on the `option(SQLITECPP_INTERNAL_SQLITE \"Add the internal SQLite3 source to the project.\" ON)` in [CMakeFiles.txt](CMakeFiles.txt)\r\n\r\n### Continuous Integration\r\n\r\nThis project is continuously tested under Ubuntu Linux with the gcc and clang compilers\r\nusing the Travis CI community service with the above CMake building and testing procedure.\r\nIt is also tested in the same way under Windows Server 2012 R2 with Visual Studio 2013 compiler\r\nusing the AppVeyor continuous integration service.\r\n\r\nDetailed results can be seen online:\r\n - [https://travis-ci.org/SRombauts/SQLiteCpp](https://travis-ci.org/SRombauts/SQLiteCpp)\r\n - [https://ci.appveyor.com/project/SbastienRombauts/SQLiteCpp](https://ci.appveyor.com/project/SbastienRombauts/SQLiteCpp)\r\n\r\n### Thread-safety\r\n\r\nSQLite supports three modes of thread safety, as describe in \"SQLite And Multiple Threads\":\r\nsee [http://www.sqlite.org/threadsafe.html](http://www.sqlite.org/threadsafe.html)\r\n\r\nThis SQLiteC++ wrapper does no add any locks (no mutexes) nor any other thread-safety mechanism\r\nabove the SQLite library itself, by design, for lightness and speed.\r\n\r\nThus, SQLiteC++ naturally supports the \"Multi Thread\" mode of SQLite:\r\n\"In this mode, SQLite can be safely used by multiple threads\r\nprovided that no single database connection is used simultaneously in two or more threads.\"\r\n\r\nBut SQLiteC++ does not support the fully thread-safe \"Serialized\" mode of SQLite,\r\nbecause of the way it shares the underlying SQLite precompiled statement\r\nin a custom shared pointer (See the inner class \"Statement::Ptr\").\r\n\r\n### Valgrind memcheck\r\n\r\nRun valgrind to search for memory leaks in your application, the SQLiteCpp wrapper, or the sqlite3 library.\r\nExecute the following command under Unix like OS (Linux, MacOS or WSL2/Ubuntu under Windows Subsystem for Linux):\r\n\r\n```Shell\r\nvalgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose build/SQLiteCpp_example1\r\n```\r\n\r\nor uncoment the line at the end of [build.sh](build.sh)\r\n\r\n## Examples\r\n### The first sample demonstrates how to query a database and get results: \r\n\r\n```C++\r\ntry\r\n{\r\n    // Open a database file\r\n    SQLite::Database    db(\"example.db3\");\r\n    \r\n    // Compile a SQL query, containing one parameter (index 1)\r\n    SQLite::Statement   query(db, \"SELECT * FROM test WHERE size \u003e ?\");\r\n    \r\n    // Bind the integer value 6 to the first parameter of the SQL query\r\n    query.bind(1, 6);\r\n    \r\n    // Loop to execute the query step by step, to get rows of result\r\n    while (query.executeStep())\r\n    {\r\n        // Demonstrate how to get some typed column value\r\n        int         id      = query.getColumn(0);\r\n        const char* value   = query.getColumn(1);\r\n        int         size    = query.getColumn(2);\r\n        \r\n        std::cout \u003c\u003c \"row: \" \u003c\u003c id \u003c\u003c \", \" \u003c\u003c value \u003c\u003c \", \" \u003c\u003c size \u003c\u003c std::endl;\r\n    }\r\n}\r\ncatch (std::exception\u0026 e)\r\n{\r\n    std::cout \u003c\u003c \"exception: \" \u003c\u003c e.what() \u003c\u003c std::endl;\r\n}\r\n```\r\n\r\n### The second sample shows how to manage a transaction:\r\n\r\n```C++\r\ntry\r\n{\r\n    SQLite::Database    db(\"transaction.db3\", SQLite::OPEN_READWRITE|SQLite::OPEN_CREATE);\r\n\r\n    db.exec(\"DROP TABLE IF EXISTS test\");\r\n\r\n    // Begin transaction\r\n    SQLite::Transaction transaction(db);\r\n\r\n    db.exec(\"CREATE TABLE test (id INTEGER PRIMARY KEY, value TEXT)\");\r\n\r\n    int nb = db.exec(\"INSERT INTO test VALUES (NULL, \\\"test\\\")\");\r\n    std::cout \u003c\u003c \"INSERT INTO test VALUES (NULL, \\\"test\\\")\\\", returned \" \u003c\u003c nb \u003c\u003c std::endl;\r\n\r\n    // Commit transaction\r\n    transaction.commit();\r\n}\r\ncatch (std::exception\u0026 e)\r\n{\r\n    std::cout \u003c\u003c \"exception: \" \u003c\u003c e.what() \u003c\u003c std::endl;\r\n}\r\n```\r\n\r\n### The third sample shows how to manage a prepared statement with a transaction:\r\n\r\n```C++\r\ntry \r\n{ \r\n    SQLite::Database    db(\"test.db3\", SQLite::OPEN_READWRITE|SQLite::OPEN_CREATE);\r\n\r\n    db.exec(\"DROP TABLE IF EXISTS test\");\r\n\r\n    db.exec(\"CREATE TABLE test (value INTEGER)\");\r\n\r\n    // Begin transaction\r\n    SQLite::Transaction transaction(db);\r\n\r\n    // Prepare query\r\n    SQLite::Statement query {db, \"INSERT INTO test (value) VALUES (?)\"};\r\n\r\n    // Collection to save in database\r\n    std::vector\u003cint\u003e values{1, 2, 3};\r\n\r\n    for (const auto\u0026 v: values)\r\n    {\r\n      query.bind(1, v);\r\n      query.exec();\r\n      query.reset();\r\n    }\r\n\r\n    // Commit transaction\r\n    transaction.commit();\r\n}\r\ncatch (std::exception\u0026 e)\r\n{\r\n  std::cout \u003c\u003c \"exception: \" \u003c\u003c e.what() \u003c\u003c std::endl;\r\n}\r\n```\r\n\r\n### How to handle assertion in SQLiteC++:\r\nExceptions shall not be used in destructors, so SQLiteC++ uses SQLITECPP_ASSERT() to check for errors in destructors.\r\nIf you don't want assert() to be called, you have to enable and define an assert handler as shown below,\r\nand by setting the flag SQLITECPP_ENABLE_ASSERT_HANDLER when compiling the lib.\r\n\r\n```C++\r\n#ifdef SQLITECPP_ENABLE_ASSERT_HANDLER\r\nnamespace SQLite\r\n{\r\n/// definition of the assertion handler enabled when SQLITECPP_ENABLE_ASSERT_HANDLER is defined in the project (CMakeList.txt)\r\nvoid assertion_failed(const char* apFile, const long apLine, const char* apFunc, const char* apExpr, const char* apMsg)\r\n{\r\n    // Print a message to the standard error output stream, and abort the program.\r\n    std::cerr \u003c\u003c apFile \u003c\u003c \":\" \u003c\u003c apLine \u003c\u003c \":\" \u003c\u003c \" error: assertion failed (\" \u003c\u003c apExpr \u003c\u003c \") in \" \u003c\u003c apFunc \u003c\u003c \"() with message \\\"\" \u003c\u003c apMsg \u003c\u003c \"\\\"\\n\";\r\n    std::abort();\r\n}\r\n}\r\n#endif\r\n```\r\n\r\n## How to contribute\r\n### GitHub website\r\nThe most efficient way to help and contribute to this wrapper project is to\r\nuse the tools provided by GitHub:\r\n- please fill bug reports and feature requests here: [https://github.com/SRombauts/SQLiteCpp/issues](https://github.com/SRombauts/SQLiteCpp/issues)\r\n- fork the repository, make some small changes and submit them with pull-request\r\n\r\n### Contact\r\nYou can also email me directly, I will try to answer questions and requests whenever I get the time for it.\r\n\r\n### Coding Style Guidelines\r\nThe source code use the CamelCase naming style variant where:\r\n- type names (class, struct, typedef, enums...) begin with a capital letter\r\n- files (.cpp/.h) are named like the class they contain\r\n- function and variable names begin with a lower case letter\r\n- member variables begin with a 'm', function arguments begin with a 'a', booleans with a 'b', pointers with a 'p'\r\n- each file, class, method and member variable is documented using Doxygen tags\r\n- braces on their own line\r\nSee also [http://www.appinf.com/download/CppCodingStyleGuide.pdf](http://www.appinf.com/download/CppCodingStyleGuide.pdf) for good guidelines\r\n\r\n## See also - Some other simple C++ SQLite wrappers:\r\n\r\nSee bellow a short comparison of other wrappers done at the time of writing:\r\n - [sqdbcpp](http://code.google.com/p/sqdbcpp/): RAII design, simple, no dependencies, UTF-8/UTF-16, new BSD license\r\n - [sqlite3cc](http://ed.am/dev/sqlite3cc): uses boost, modern design, LPGPL\r\n - [sqlite3pp](https://github.com/iwongu/sqlite3pp): modern design inspired by boost, MIT License\r\n - [SQLite++](http://sqlitepp.berlios.de/): uses boost build system, Boost License 1.0 \r\n - [CppSQLite](http://www.codeproject.com/Articles/6343/CppSQLite-C-Wrapper-for-SQLite/): famous Code Project but old design, BSD License \r\n - [easySQLite](http://code.google.com/p/easysqlite/): manages table as structured objects, complex \r\n - [sqlite_modern_cpp](https://github.com/keramer/sqlite_modern_cpp): modern C++11, all in one file, MIT license\r\n - [sqlite_orm](https://github.com/fnc12/sqlite_orm): modern C++14, header only all in one file, no raw string queries, BSD-3 license\r\n","funding_links":["https://www.paypal.me/SRombauts"],"categories":["TODO scan for Android support in followings","Database","C","Networking","Libraries and Frameworks"],"sub_categories":["Database"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSRombauts%2FSQLiteCpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSRombauts%2FSQLiteCpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSRombauts%2FSQLiteCpp/lists"}