Repo symbol

sqlitecpp repository

Repo symbol

sqlitecpp repository

Repo symbol

sqlitecpp repository

Repo symbol

sqlitecpp repository

Repo symbol

sqlitecpp repository

SQLiteCpp

Repository Summary

Description SQLiteC++ (SQLiteCpp) is a smart and easy to use C++ SQLite3 wrapper.
Checkout URI https://github.com/srombauts/sqlitecpp.git
VCS Type git
VCS Version master
Last Updated 2025-07-13
Dev Status UNKNOWN
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
SQLiteCpp 3.3.3

README

SQLiteC++

release license Travis CI Linux Build Status AppVeyor Windows Build status GitHub Actions Build status Coveralls Coverity Join the chat at https://gitter.im/SRombauts/SQLiteCpp

SQLiteC++ (SQLiteCpp) is a lean and easy to use C++ SQLite3 wrapper.

About SQLiteC++:

SQLiteC++ offers an encapsulation around the native C APIs of SQLite, with a few intuitive and well documented C++ classes.

License:

Copyright (c) 2012-2025 Sébastien Rombauts (sebastien.rombauts@gmail.com)

Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt or copy at http://opensource.org/licenses/MIT)

Note on redistribution of SQLite source files

As stated by the MIT License, you are welcome to reuse, modify, and redistribute the SQLiteCpp source code the way you want it to, be it a git submodule, a subdirectory, or a selection of some source files.

I would love a mention in your README, a web link to the SQLite repository, and a mention of the author, but none of those are mandatory.

About SQLite underlying library:

SQLite is a library that implements a serverless transactional SQL database engine. It is the most widely deployed SQL database engine in the world. All of the code and documentation in SQLite has been dedicated to the public domain by the authors. http://www.sqlite.org/about.html

The goals of SQLiteC++ are:

  • to offer the best of the existing simple C++ SQLite wrappers
  • to be elegantly written with good C++11 design, STL, exceptions and RAII idiom
  • to keep dependencies to a minimum (C++11 STL and SQLite3)
  • to be portable
  • to be light and fast
  • to be thread-safe only as much as SQLite “Multi-thread” mode (see below)
  • to have a good unit test coverage
  • to use API names sticking with those of the SQLite library
  • to be well documented with Doxygen tags, and with some good examples
  • to be well maintained
  • to use a permissive MIT license, similar to BSD or Boost, for proprietary/commercial usage

It is designed using the Resource Acquisition Is Initialization (RAII) idiom (see http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization), and throwing exceptions in case of SQLite errors (except in destructors, where assert() are used instead). Each SQLiteC++ object must be constructed with a valid SQLite database connection, and then is always valid until destroyed.

Supported platforms:

Now requires a C++11 compiler. Use branch sqlitecpp-2.x for latest pre-C++11 developments.

Developments and tests are done under the following OSs:

  • Ubuntu 14.04, 16.04 and 18.04 (Travis CI and Github Actions)
  • Windows 10, and Windows Server 2012 R2, Windows Server 2016, Windows Server 2022 (AppVeyor and Github Actions)
  • MacOS 10.11 and 11.7 (Travis CI and Github Actions)
  • Valgrind memcheck tool

And the following IDEs/Compilers

  • GCC 4.8.4, 5.3.0, 7.1.1 and latest eg 9.4 (C++11, C++14, C++17)
  • Clang 5 and 7 (Travis CI)
  • AppleClang 8, 9 and 13 (Travis CI and Github Actions)
  • Xcode 8 & 9 (Travis CI)
  • Visual Studio Community/Entreprise 2022, 2019, 2017, and 2015 (AppVeyor and Github Actions)

Dependencies

  • a modern C++11 STL implementation with GCC, Clang, or Visual Studio 2015
  • exception support (the class Exception inherits from std::runtime_error)
  • 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), or by adding its source file in your project code base (source code provided in src/sqlite3 for Windows), with the SQLITE_ENABLE_COLUMN_METADATA macro defined (see http://www.sqlite.org/compile.html#enable_column_metadata).

Getting started

Installation

To use this wrapper, you need to add the SQLiteC++ source files from the src/ directory in your project code base, and compile/link against the sqlite library.

The easiest way to do this is to add the wrapper as a library. The “CMakeLists.txt” file defining the static library is provided in the root directory, so you simply have to add_subdirectory(SQLiteCpp) to you main CMakeLists.txt and link to the “SQLiteCpp” wrapper library.

File truncated at 100 lines see the full file

Repo symbol

sqlitecpp repository

Repo symbol

sqlitecpp repository

Repo symbol

sqlitecpp repository

Repo symbol

sqlitecpp repository