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

Related tags

Database SQLiteCpp
Overview

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 smart 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-2021 Sébastien Rombauts ([email protected])

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)
  • Windows 10, and Windows Server 2012 R2 & Windows Server 2016 (AppVeyor)
  • OS X 10.11 (Travis CI)
  • Github Actions
  • Valgrind memcheck tool

And the following IDEs/Compilers

  • GCC 4.8.4, 5.3.0 and 7.1.1 (C++11, C++14, C++17)
  • Clang 5
  • Xcode 8 & 9
  • Visual Studio Community 2019, 2017, and 2015 (AppVeyor)

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.

Example for Linux:

add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/thirdparty/SQLiteCpp)

add_executable(main src/main.cpp)
target_link_libraries(main
  SQLiteCpp
  sqlite3
  pthread
  dl
  )

Thus this SQLiteCpp repository can be directly used as a Git submodule. See the SQLiteCpp_Example side repository for a standalone "from scratch" example.

Under Debian/Ubuntu/Mint Linux, you can install the libsqlite3-dev package if you don't want to use the embedded sqlite3 library.

Building example and unit-tests:

Use git to clone the repository. Then init and update submodule "googletest".

git clone https://github.com/SRombauts/SQLiteCpp.git
cd SQLiteCpp
git submodule init
git submodule update

Using SQLiteCpp on a system-wide installation

If you installed this package to your system, a SQLiteCppConfig.cmake file will be generated & installed to your system.
This file lets you link against the SQLiteCpp library for use in your Cmake project.

Here's an example of using this in your CMakeLists.txt

# You can optionally define a minimum version in this call
find_package(SQLiteCpp REQUIRED)
# For this example, lets say you created an target with add_executable (or add_library) called "my_target"
# You can optionally declare PUBLIC or PRIVATE linkage here, depending on your needs.
target_link_libraries(my_target PRIVATE SQLiteCpp)

CMake and tests

A CMake configuration file is also provided for multi-platform support and testing.

Typical generic build for MS Visual Studio under Windows (from build.bat):

mkdir build
cd build

cmake ..        # cmake .. -G "Visual Studio 16 2019"    # for Visual Studio 2019
@REM Generate a Visual Studio solution for latest version found
cmake -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON ..

@REM Build default configuration (ie 'Debug')
cmake --build .

@REM Build and run tests
ctest --output-on-failure

Generating the Linux Makefile, building in Debug and executing the tests (from build.sh):

mkdir Debug
cd Debug

# Generate a Makefile for GCC (or Clang, depanding on CC/CXX envvar)
cmake -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON ..

# Build (ie 'make')
cmake --build .

# Build and run unit-tests (ie 'make test')
ctest --output-on-failure

CMake options

  • For more options on customizing the build, see the CMakeLists.txt file.

Troubleshooting

Under Linux, if you get multiple linker errors like "undefined reference to sqlite3_xxx", it's that you lack the "sqlite3" library: install the libsqlite3-dev package.

If you get a single linker error "Column.cpp: undefined reference to sqlite3_column_origin_name", it's that your "sqlite3" library was not compiled with the SQLITE_ENABLE_COLUMN_METADATA macro defined (see http://www.sqlite.org/compile.html#enable_column_metadata). You can either recompile it yourself (seek help online) or you can comment out the following line in src/Column.h:

#define SQLITE_ENABLE_COLUMN_METADATA

Continuous Integration

This project is continuously tested under Ubuntu Linux with the gcc and clang compilers using the Travis CI community service with the above CMake building and testing procedure. It is also tested in the same way under Windows Server 2012 R2 with Visual Studio 2013 compiler using the AppVeyor continuous integration service.

Detailed results can be seen online:

Thread-safety

SQLite supports three modes of thread safety, as describe in "SQLite And Multiple Threads": see http://www.sqlite.org/threadsafe.html

This SQLiteC++ wrapper does no add any locks (no mutexes) nor any other thread-safety mechanism above the SQLite library itself, by design, for lightness and speed.

Thus, SQLiteC++ naturally supports the "Multi Thread" mode of SQLite: "In this mode, SQLite can be safely used by multiple threads provided that no single database connection is used simultaneously in two or more threads."

But SQLiteC++ does not support the fully thread-safe "Serialized" mode of SQLite, because of the way it shares the underlying SQLite precompiled statement in a custom shared pointer (See the inner class "Statement::Ptr").

Examples

The first sample demonstrates how to query a database and get results:

try
{
    // Open a database file
    SQLite::Database    db("example.db3");
    
    // Compile a SQL query, containing one parameter (index 1)
    SQLite::Statement   query(db, "SELECT * FROM test WHERE size > ?");
    
    // Bind the integer value 6 to the first parameter of the SQL query
    query.bind(1, 6);
    
    // Loop to execute the query step by step, to get rows of result
    while (query.executeStep())
    {
        // Demonstrate how to get some typed column value
        int         id      = query.getColumn(0);
        const char* value   = query.getColumn(1);
        int         size    = query.getColumn(2);
        
        std::cout << "row: " << id << ", " << value << ", " << size << std::endl;
    }
}
catch (std::exception& e)
{
    std::cout << "exception: " << e.what() << std::endl;
}

The second sample shows how to manage a transaction:

try
{
    SQLite::Database    db("transaction.db3", SQLite::OPEN_READWRITE|SQLite::OPEN_CREATE);

    db.exec("DROP TABLE IF EXISTS test");

    // Begin transaction
    SQLite::Transaction transaction(db);

    db.exec("CREATE TABLE test (id INTEGER PRIMARY KEY, value TEXT)");

    int nb = db.exec("INSERT INTO test VALUES (NULL, \"test\")");
    std::cout << "INSERT INTO test VALUES (NULL, \"test\")\", returned " << nb << std::endl;

    // Commit transaction
    transaction.commit();
}
catch (std::exception& e)
{
    std::cout << "exception: " << e.what() << std::endl;
}

How to handle assertion in SQLiteC++:

Exceptions shall not be used in destructors, so SQLiteC++ uses SQLITECPP_ASSERT() to check for errors in destructors. If you don't want assert() to be called, you have to enable and define an assert handler as shown below, and by setting the flag SQLITECPP_ENABLE_ASSERT_HANDLER when compiling the lib.

#ifdef SQLITECPP_ENABLE_ASSERT_HANDLER
namespace SQLite
{
/// definition of the assertion handler enabled when SQLITECPP_ENABLE_ASSERT_HANDLER is defined in the project (CMakeList.txt)
void assertion_failed(const char* apFile, const long apLine, const char* apFunc, const char* apExpr, const char* apMsg)
{
    // Print a message to the standard error output stream, and abort the program.
    std::cerr << apFile << ":" << apLine << ":" << " error: assertion failed (" << apExpr << ") in " << apFunc << "() with message \"" << apMsg << "\"\n";
    std::abort();
}
}
#endif

How to contribute

GitHub website

The most efficient way to help and contribute to this wrapper project is to use the tools provided by GitHub:

Contact

You can also email me directly, I will try to answer questions and requests whenever I get the time for it.

Coding Style Guidelines

The source code use the CamelCase naming style variant where:

  • type names (class, struct, typedef, enums...) begin with a capital letter
  • files (.cpp/.h) are named like the class they contain
  • function and variable names begin with a lower case letter
  • member variables begin with a 'm', function arguments begin with a 'a', booleans with a 'b', pointers with a 'p'
  • each file, class, method and member variable is documented using Doxygen tags
  • braces on their own line See also http://www.appinf.com/download/CppCodingStyleGuide.pdf for good guidelines

See also - Some other simple C++ SQLite wrappers:

See bellow a short comparison of other wrappers done at the time of writing:

  • sqdbcpp: RAII design, simple, no dependencies, UTF-8/UTF-16, new BSD license
  • sqlite3cc: uses boost, modern design, LPGPL
  • sqlite3pp: modern design inspired by boost, MIT License
  • SQLite++: uses boost build system, Boost License 1.0
  • CppSQLite: famous Code Project but old design, BSD License
  • easySQLite: manages table as structured objects, complex
  • sqlite_modern_cpp: modern C++11, all in one file, MIT license
  • sqlite_orm: modern C++14, header only all in one file, no raw string queries, BSD-3 license
Issues
  • Problems with

    Problems with "arm64-v8a" and "x86_64" on Android on bind method

    Hi,

    Im compiling a program in archs win64, macos64, all ios archs and all android archs.

    But only on Android NDK 18 "arm64-v8a" and "x86_64" i get problem:

    /Users/paulo/Developer/workspaces/cpp/ezored/files/src/003-app-data-services/cpp/ezored/dataservices/EZRTodoDataService.cpp:91:11: error: call to member function 'bind' is ambiguous
        query.bind(":id", id);
        ~~~~~~^~~~
    

    My method is simple:

    void TodoDataService::update(int64_t id, const Todo & todo)
    {
        auto sql = \
                "UPDATE todo SET " \
                "title = :title, " \
                "body = :body, " \
                "data = :data, " \
                "done = :done, " \
                "updated_at = :updated_at " \
                "WHERE id = :id";
    
        auto application = std::static_pointer_cast<ApplicationCoreImpl>(ApplicationCore::shared());
        auto db = application->getDB();
    
        SQLite::Statement query(*db, sql);
    
        query.bind(":id", id);    // <----- line with error
        query.bind(":title", todo.title);
        query.bind(":body", todo.body);
        query.bind(":data", MapHelper::toJsonString(todo.data));
        query.bind(":done", todo.done);
        query.bind(":updated_at", DateTime::getStringFromDateTime(todo.updatedAt));
        query.exec();
    }
    

    I cannot change from "int64_t" because it is used by djinni to generate all "i64" types.

    Can you help me? Im need it to publish new version of my library.

    Thanks.

    FULL LOG

    /Users/paulo/Developer/workspaces/cpp/ezored/files/src/003-app-data-services/cpp/ezored/dataservices/EZRTodoDataService.cpp:91:11: error: call to member function 'bind' is ambiguous
        query.bind(":id", id);
        ~~~~~~^~~~
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:175:10: note: candidate function
        void bind(const char* apName, const int             aValue);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:179:10: note: candidate function
        void bind(const char* apName, const unsigned        aValue);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:183:10: note: candidate function
        void bind(const char* apName, const long long       aValue);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:187:10: note: candidate function
        void bind(const char* apName, const double          aValue);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:239:17: note: candidate function
        inline void bind(const std::string& aName, const int            aValue)
                    ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:246:17: note: candidate function
        inline void bind(const std::string& aName, const unsigned       aValue)
                    ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:253:17: note: candidate function
        inline void bind(const std::string& aName, const long long      aValue)
                    ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:260:17: note: candidate function
        inline void bind(const std::string& aName, const double         aValue)
                    ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:112:10: note: candidate function not viable: no known conversion
          from 'const char [4]' to 'const int' for 1st argument
        void bind(const int aIndex, const int           aValue);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:116:10: note: candidate function not viable: no known conversion
          from 'const char [4]' to 'const int' for 1st argument
        void bind(const int aIndex, const unsigned      aValue);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:120:10: note: candidate function not viable: no known conversion
          from 'const char [4]' to 'const int' for 1st argument
        void bind(const int aIndex, const long long     aValue);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:124:10: note: candidate function not viable: no known conversion
          from 'const char [4]' to 'const int' for 1st argument
        void bind(const int aIndex, const double        aValue);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:193:10: note: candidate function not viable: no known conversion
          from 'int64_t' (aka 'long') to 'const std::string' (aka 'const basic_string<char, char_traits<char>, allocator<char> >') for 2nd argument
        void bind(const char* apName, const std::string&    aValue);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:199:10: note: candidate function not viable: no known conversion
          from 'int64_t' (aka 'long') to 'const char *' for 2nd argument
        void bind(const char* apName, const char*           apValue);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:269:17: note: candidate function not viable: no known conversion
          from 'int64_t' (aka 'long') to 'const std::string' (aka 'const basic_string<char, char_traits<char>, allocator<char> >') for 2nd argument
        inline void bind(const std::string& aName, const std::string&    aValue)
                    ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:278:17: note: candidate function not viable: no known conversion
          from 'int64_t' (aka 'long') to 'const char *' for 2nd argument
        inline void bind(const std::string& aName, const char*           apValue)
                    ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:130:10: note: candidate function not viable: no known conversion
          from 'const char [4]' to 'const int' for 1st argument
        void bind(const int aIndex, const std::string&  aValue);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:136:10: note: candidate function not viable: no known conversion
          from 'const char [4]' to 'const int' for 1st argument
        void bind(const int aIndex, const char*         apValue);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:170:10: note: candidate function not viable: requires single
          argument 'aIndex', but 2 arguments were provided
        void bind(const int aIndex);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:233:10: note: candidate function not viable: requires single
          argument 'apName', but 2 arguments were provided
        void bind(const char* apName); // bind NULL value
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:327:17: note: candidate function not viable: requires single
          argument 'aName', but 2 arguments were provided
        inline void bind(const std::string& aName) // bind NULL value
                    ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:142:10: note: candidate function not viable: requires 3
          arguments, but 2 were provided
        void bind(const int aIndex, const void*         apValue, const int aSize);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:205:10: note: candidate function not viable: requires 3
          arguments, but 2 were provided
        void bind(const char* apName, const void*           apValue, const int aSize);
             ^
    /Users/paulo/.conan/data/sqlitecpp/2.2.0/bincrafters/stable/package/2523426ca55b5c6ecb33b90575275e28ccb7fd4b/include/SQLiteCpp/Statement.h:287:17: note: candidate function not viable: requires 3
          arguments, but 2 were provided
        inline void bind(const std::string& aName, const void*           apValue, const int aSize)
    
    bug 
    opened by paulocoutinhox 22
  • Added support for external sqlite3

    Added support for external sqlite3

    This PR adds support for an externally compiled SQLite3. There are two main changes:

    1. Detect and use SQLite3 via cmake if requested by the user, and
    2. Always link SQLiteCpp against cmake detected Threads::Threads and DL-libs.

    The second change is a simplification and cleanup. SQLite3 always requires threads and DL-libraries. Therefore it seems not sensible to specify them individually for each target.

    This PR also uses cmake standard functionality to detect the actual threads-implementation and DL-libraries for the current platform. This should improve portability to other (less common) platforms that may not use the name pthreads but another threading library name.

    enhancement 
    opened by emmenlau 16
  • Unit test suite

    Unit test suite

    Hi,

    Firstly, nice looking library! Forked it and created a config file for CMake to play around with deploying it in some of my research projects.

    One thing I noticed is that I can't seem to spot any unit tests that ship with the code, and I believe you've listed that as one of the goals for the library in the readme file.

    Do you happen to have any unit tests written that demonstrate how the code implements RAII fully?

    Thanks,

    Kartik

    enhancement 
    opened by kartikkumar 13
  • Disable explicit setting of MSVC runtime

    Disable explicit setting of MSVC runtime

    This PR removes the explicit setting of the MSVC runtime from SQLiteCpp. This is because overriding the default runtime can have various negative implications. For example, the build of SQLiteCpp fails on MSVC 2019 with errors:

    LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
    LINK : warning LNK4217: symbol 'free' defined in 'libucrtd.lib(free.obj)' is imported by 'sqlite3.lib(sqlite3.c.obj)' in function 'vfsUnlink'
    LINK : warning LNK4217: symbol 'malloc' defined in 'libucrtd.lib(malloc.obj)' is imported by 'sqlite3.lib(sqlite3.c.obj)' in function 'vfsUnlink'
    LINK : warning LNK4217: symbol '__acrt_iob_func' defined in 'libucrtd.lib(_file.obj)' is imported by 'sqlite3.lib(sqlite3.c.obj)' in function 'sqlite3VdbePrintOp'
    LINK : warning LNK4217: symbol 'fflush' defined in 'libucrtd.lib(fflush.obj)' is imported by 'sqlite3.lib(sqlite3.c.obj)' in function 'sqlite3VdbePrintOp'
    LINK : warning LNK4217: symbol '__stdio_common_vfprintf' defined in 'libucrtd.lib(output.obj)' is imported by 'sqlite3.lib(sqlite3.c.obj)' in function '_vfprintf_l'
    LINK : warning LNK4217: symbol 'strcspn' defined in 'libucrtd.lib(strcspn.obj)' is imported by 'sqlite3.lib(sqlite3.c.obj)' in function 'patternCompare'
    LINK : warning LNK4217: symbol 'strncmp' defined in 'libucrtd.lib(strncmp.obj)' is imported by 'sqlite3.lib(sqlite3.c.obj)' in function 'sqlite3VListNameToNum'
    LINK : warning LNK4217: symbol '_wassert' defined in 'libucrtd.lib(assert.obj)' is imported by 'sqlite3.lib(sqlite3.c.obj)' in function 'sqlite3CompileOptions'
    sqlite3.lib(sqlite3.c.obj) : error LNK2019: unresolved external symbol __imp__msize referenced in function vfsUnlink
    sqlite3.lib(sqlite3.c.obj) : error LNK2019: unresolved external symbol __imp_realloc referenced in function vfsUnlink
    sqlite3.lib(sqlite3.c.obj) : error LNK2019: unresolved external symbol __imp__localtime64_s referenced in function localtime_s
    sqlite3.lib(sqlite3.c.obj) : error LNK2019: unresolved external symbol __imp__beginthreadex referenced in function sqlite3ThreadCreate
    sqlite3.lib(sqlite3.c.obj) : error LNK2019: unresolved external symbol __imp__endthreadex referenced in function sqlite3ThreadProc
    SQLiteCpp_example1.exe : fatal error LNK1120: 5 unresolved externals
    

    This error is resolved by the PR.

    enhancement 
    opened by emmenlau 12
  • Makefile errors

    Makefile errors

    When I make the Makefile generated by cmake I get those errors:

    Scanning dependencies of target SQLiteCpp [ 20%] Building CXX object src/CMakeFiles/SQLiteCpp.dir/Column.cpp.o [ 40%] Building CXX object src/CMakeFiles/SQLiteCpp.dir/Database.cpp.o [ 60%] Building CXX object src/CMakeFiles/SQLiteCpp.dir/Statement.cpp.o /home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/src/Statement.cpp: In member function ‘void SQLite::Statement::bind(int, const string&)’: /home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/src/Statement.cpp:69:79: warning: conversion to ‘int’ from ‘std::basic_string::size_type {aka long unsigned int}’ may alter its value [-Wconversion] /home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/src/Statement.cpp: In member function ‘void SQLite::Statement::bind(const char_, const string&)’: /home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/src/Statement.cpp:123:80: warning: conversion to ‘int’ from ‘std::basic_string::size_type {aka long unsigned int}’ may alter its value [-Wconversion] /home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/src/Statement.cpp: In constructor ‘SQLite::Statement::Ptr::Ptr(sqlite3_, std::string&)’: /home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/src/Statement.cpp:272:72: warning: conversion to ‘int’ from ‘std::basic_string::size_type {aka long unsigned int}’ may alter its value [-Wconversion] [ 80%] Building CXX object src/CMakeFiles/SQLiteCpp.dir/Transaction.cpp.o Linking CXX static library libSQLiteCpp.a [ 80%] Built target SQLiteCpp Scanning dependencies of target example1 [100%] Building CXX object CMakeFiles/example1.dir/examples/example1/main.cpp.o /home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/examples/example1/main.cpp: In function ‘int main()’: /home/alexxanderx/Work/Programare/Libraries/SQLiteCpp-master/examples/example1/main.cpp:302:37: warning: conversion to ‘int’ from ‘size_t {aka long unsigned int}’ may alter its value [-Wconversion] Linking CXX executable example1 src/libSQLiteCpp.a(Column.cpp.o): In function SQLite::Column::getName() const': Column.cpp:(.text+0x163): undefined reference tosqlite3_column_origin_name' collect2: error: ld returned 1 exit status make[2]: *** [example1] Error 1 make[1]: *** [CMakeFiles/example1.dir/all] Error 2 make: *** [all] Error 2

    question 
    opened by Aykelith 12
  • Added SQLite header parsing functionality and associated tests

    Added SQLite header parsing functionality and associated tests

    Added header parsing functionality via a getHeaderInfo() function. This function reads the first 100 bytes of a SQLite database file and attempts to reconstruct byte groups into the specific header fields within a Header object. Also added tests to demonstrate updating header values via PRAGMA and verifying updated / default header values.

    enhancement 
    opened by ptrks 11
  • 'SQLiteCpp/SQLiteCpp.h' file not found

    'SQLiteCpp/SQLiteCpp.h' file not found

    Master branch seems to have broken header file exporting:

    git clone --recursive https://github.com/SRombauts/SQLiteCpp_Example.git
    cd SQLiteCpp_Example/SQLiteCpp
    git checkout master
    cd ..
    mkdir build
    cd build
    cmake ..
    make
    /tmp/SQLiteCpp_Example/src/main.cpp:17:10: fatal error: 'SQLiteCpp/SQLiteCpp.h' file not found
    #include <SQLiteCpp/SQLiteCpp.h>
             ^~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.
    

    It works correctly with the tagged version in the example project: SQLiteCpp @ 8485bb7

    bug 
    opened by bear24rw 10
  • Conflict with sqlite struct - Conan recipe

    Conflict with sqlite struct - Conan recipe

    Hi,

    Im trying update conan sqlitecpp recipe to version 2.5.0 but get this error:

    -- Build files have been written to: /tmp/c3ipr/pr_643_7_1_0/.conan/data/sqlitecpp/2.5.0/_/_/build/5ea64b7ccbed5c393974c5c75c50c8ee9845b7b5/build_subfolder
    Scanning dependencies of target SQLiteCpp
    [ 14%] Building CXX object source_subfolder/CMakeFiles/SQLiteCpp.dir/src/Backup.cpp.o
    [ 28%] Building CXX object source_subfolder/CMakeFiles/SQLiteCpp.dir/src/Column.cpp.o
    [ 42%] Building CXX object source_subfolder/CMakeFiles/SQLiteCpp.dir/src/Database.cpp.o
    In file included from /tmp/c3ipr/pr_643_7_1_0/.conan/data/sqlitecpp/2.5.0/_/_/build/5ea64b7ccbed5c393974c5c75c50c8ee9845b7b5/source_subfolder/src/Backup.cpp:16:0:
    /usr/include/sqlite3.h:3455:20: error: conflicting declaration ‘typedef struct Mem sqlite3_value’
     typedef struct Mem sqlite3_value;
                        ^
    In file included from /tmp/c3ipr/pr_643_7_1_0/.conan/data/sqlitecpp/2.5.0/_/_/build/5ea64b7ccbed5c393974c5c75c50c8ee9845b7b5/source_subfolder/include/SQLiteCpp/Backup.h:14:0,
                     from /tmp/c3ipr/pr_643_7_1_0/.conan/data/sqlitecpp/2.5.0/_/_/build/5ea64b7ccbed5c393974c5c75c50c8ee9845b7b5/source_subfolder/src/Backup.cpp:12:
    /tmp/c3ipr/pr_643_7_1_0/.conan/data/sqlitecpp/2.5.0/_/_/build/5ea64b7ccbed5c393974c5c75c50c8ee9845b7b5/source_subfolder/include/SQLiteCpp/Database.h:22:30: note: previous declaration as ‘typedef struct sqlite3_value sqlite3_value’
     typedef struct sqlite3_value sqlite3_value;
                                  ^
    source_subfolder/CMakeFiles/SQLiteCpp.dir/build.make:62: recipe for target 'source_subfolder/CMakeFiles/SQLiteCpp.dir/src/Backup.cpp.o' failed
    make[2]: *** [source_subfolder/CMakeFiles/SQLiteCpp.dir/src/Backup.cpp.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    In file included from /tmp/c3ipr/pr_643_7_1_0/.conan/data/sqlitecpp/2.5.0/_/_/build/5ea64b7ccbed5c393974c5c75c50c8ee9845b7b5/source_subfolder/src/Database.cpp:17:0:
    /usr/include/sqlite3.h:3455:20: error: conflicting declaration ‘typedef struct Mem sqlite3_value’
     typedef struct Mem sqlite3_value;
                        ^
    In file included from /tmp/c3ipr/pr_643_7_1_0/.conan/data/sqlitecpp/2.5.0/_/_/build/5ea64b7ccbed5c393974c5c75c50c8ee9845b7b5/source_subfolder/src/Database.cpp:11:0:
    /tmp/c3ipr/pr_643_7_1_0/.conan/data/sqlitecpp/2.5.0/_/_/build/5ea64b7ccbed5c393974c5c75c50c8ee9845b7b5/source_subfolder/include/SQLiteCpp/Database.h:22:30: note: previous declaration as ‘typedef struct sqlite3_value sqlite3_value’
     typedef struct sqlite3_value sqlite3_value;
                                  ^
    source_subfolder/CMakeFiles/SQLiteCpp.dir/build.make:88: recipe for target 'source_subfolder/CMakeFiles/SQLiteCpp.dir/src/Database.cpp.o' failed
    make[2]: *** [source_subfolder/CMakeFiles/SQLiteCpp.dir/src/Database.cpp.o] Error 1
    CMakeFiles/Makefile2:93: recipe for target 'source_subfolder/CMakeFiles/SQLiteCpp.dir/all' failed
    make[1]: *** [source_subfolder/CMakeFiles/SQLiteCpp.dir/all] Error 2
    Makefile:129: recipe for target 'all' failed
    make: *** [all] Error 2
    sqlitecpp/2.5.0: 
    

    PR: https://github.com/conan-io/conan-center-index/pull/643

    The conanfile already set "SQLITECPP_INTERNAL_SQLITE" to "OFF", so i think that it is not the problem.

    Can you see another thing that can be the problem?

    Thanks.

    question 
    opened by paulocoutinhox 10
  • Incompatibility in 3.19.0

    Incompatibility in 3.19.0

    Released all the way back in yesterday, and it's still broken! ;)

    SQLite 3.19.0 is incompatible with this library thanks to a minor change to the main header file (sqlite3.h) as detailed here. I resolved this by making the same change to the forward declaration in Database.h. Unfortunately, I'm not sure how to fix it in a backwards-compatible fashion since having access to SQLITE_VERSION_NUMBER in Database.h would require including the header those declarations are there to avoid.

    bug 
    opened by tdavis 10
  • undefined reference to `SQLite::Database::Deleter::operator()(sqlite3*)'

    undefined reference to `SQLite::Database::Deleter::operator()(sqlite3*)'

    I've now used SQLiteCpp for the last few week in the project I'm working on (Amarok) without any issues. After getting the latest version of SQLiteCpp I'm getting the following error

    /usr/bin/ld: CMakeFiles/amarok_storage-sqlitestorage.dir/SQLiteStorage.cpp.o: in functionstd::unique_ptr<sqlite3, SQLite::Database::Deleter>::~unique_ptr()': /usr/include/c++/8/bits/unique_ptr.h:274: undefined reference to SQLite::Database::Deleter::operator()(sqlite3*)' collect2: error: ld returned 1 exit status

    I'm guessing that this error is related to the later release as I'm working on a VM and if I restore the snapshot with working code and get the latest version of SQLiteCpp, I get the above error. Thanks, Leo

    question 
    opened by poldi171254 9
  • CMakeLists.txt: use transitive compile definitions via cmake

    CMakeLists.txt: use transitive compile definitions via cmake

    This PR adds transitive compile definitions via cmake. When this PR is used, a slightly more "modern" syntax is employed for the compile defines SQLITE_ENABLE_COLUMN_METADATA, SQLITECPP_ENABLE_ASSERT_HANDLER, and SQLITE_USE_LEGACY_STRUCT. With this more modern syntax, its possible to specify for every flag a PUBLIC or PRIVATE visibility. With PUBLIC visibility (currently the default in this PR), downstream projects also have access to the flags.

    This can be specifically helpful for SQLITE_ENABLE_COLUMN_METADATA, which downstream projects can use to tweak their code at compile time.

    Please feel free to change the visibility of the individual flags. The previous default (before this PR) was PRIVATE visibility for all three flags.

    opened by emmenlau 9
  • Windows improved support (meson)

    Windows improved support (meson)

    this PR is an improvement of #352, managing to compile statically and run unit tests successfully on windows. a summary of the changes in this PR:

    • Meson file
      • use c++14 on windows(due to an error with xstddef)
      • add a preprocessor definition ('NON_AMBIGOUS_OVERLOAD') to use int instead of long to prevent ambiguous overload when compiling with clang++, it does not affect cmake and it only is enabled on meson
    • Unit tests
      • tests/Statement_test.cpp -> use "int64_t"(supported on c++11) instead of "long long" to prevent ambiguous overload errors (tested both on Arch Linux & Windows w clang)
      • tests/Statement_test.cpp -> check if NON_AMBIGOUS_OVERLOAD is defined and use int instead of long if is the case (to prevent ambiguous overload on windows)

    the library still does not compile dynamically (as windows does not export the functions by default), so that should be fixed on an 3rd PR potentially fixing #280 and #53 for both meson and cmake, but this is a start before working on adding a macro for that feature.

    after the dynamic compilation on windows is fixed, we could put the package on wrapdb so more users can use it easily.

    opened by ninjaoflight 0
  • support latest sqlite3 for ```returning``` clause

    support latest sqlite3 for ```returning``` clause

    The latest sqlite3 supports returning-clause to return affected rows in delete and others. It's useful and could you please support it?

    The first version supports returning-clause is 3.36, released on June 20, 2021. https://github.com/sqlite/sqlite/releases/tag/version-3.36.0

    sqlite> select * from tbl_secureditemlist;
    fld_dbid  fld_itemid  fld_seqid  fld_count  fld_duration  fld_extattrlist
    --------  ----------  ---------  ---------  ------------  ---------------
    2         687         9          1          1             
    2         687         6          1          1             
    2         692         9          1          1             
    2         692         8          1          1             
    2         692         1          1          1             
    2         687         8          1          1             
    2         687         10         1          1             
    2         692         4          1          1             
    2         692         3          1          1             
    2         687         11         1          1             
    2         692         7          1          1             
    2         692         6          1          1             
    2         687         13         1          1             
    2         692         5          1          1             
    2         687         12         1          1             
    2         687         14         1          1             
    2         687         15         1          1             
    2         687         7          1          1             
    2         666         5          1          1             
    2         687         16         1          1             
    sqlite> delete from tbl_secureditemlist where fld_dbid = 2 and fld_itemid = 687 and fld_seqid = 9 returning *;
    fld_dbid  fld_itemid  fld_seqid  fld_count  fld_duration  fld_extattrlist
    --------  ----------  ---------  ---------  ------------  ---------------
    2         687         9          1          1             
    
    opened by etorth 3
  • [Question] Possible to bind NULL ?

    [Question] Possible to bind NULL ?

    For example

    SQLite::Statement query(db, "INSERT INTO media VALUES (NULL, :CategoryID, :title)");
    query.bind(":CategoryID", CategoryID); 
    query.bind(":title", title); 
    

    Where CategoryID is a Foreign Key works great unless I need to pass a null CategoryID, in which case an exception is thrown. Doing a check and making CategoryID = "NULL" also doesn't work as that gets expanded to " 'NULL' " Currently Im concatenating the variable within the insert statement itself as a workaround, but would like to find a more correct way with bind

    question 
    opened by omar-a-007 4
  • [BUG] filesystem: No such file or directory

    [BUG] filesystem: No such file or directory

    Bug may exist in this line.

    I use SQLiteCpp on WSL (Ubuntu 18.04 and Ubuntu 20.04) and compile it with --std=c++17. However, it always raises an error filesystem: No such file or directory.

    After debugging, I found that __cplusplus = 201703, so (__cplusplus >= 201703L) && ((!defined(__MINGW32__) && !defined(__MINGW64__)) || (__GNUC__ > 8)) must be true. But, my g++ version is 7.5 and I know from this answer that 'GCC v7 still does not implement <filesystem>'.

    Maybe this is a bug? I haven't test it on a real Linux system.

    opened by 0NG 3
Releases(3.1.1)
  • 3.1.1(Aug 19, 2020)

    Version 3.1.1 - August 19 2020

    • #292 Fix compilation if using SQLITE_HAS_CODEC from sum01/fix_sqlcipher_compile
    • #293 Remove FindSQLiteCpp.cmake from sum01/fix_283
    Source code(tar.gz)
    Source code(zip)
  • 3.1.0(Aug 11, 2020)

    Version 3.1.0 - August 11 2020

    • Update SQLite3 from 3.30.1 to 3.32.3 (2020-06-18)
    • #274 Install both cmake files into same lib directory from tcraigtyler/master
    • #275 Add a method on Statement to get the declared type of a column. from daniel-schmidt/master
    • #284 Add SQLITE_OPEN_FULLMUTEX flag from rwrx/fullmutex-flag
    • #286 Add CMake option to toggle stack protection from chrisdalke/master
    • #287 Fixed installation on other than Ubuntu distributions from xvitaly/fix-installation
    • #288 Allow building of sqlite JSON1 extension when building internal sqlite library from zxey/feature-json1-extension
    Source code(tar.gz)
    Source code(zip)
  • 3.0.0(Jan 31, 2020)

    Version 3.0.0 - January 31 2020

    • C++11 is now required
    • CMake 3.1 minimum
    • Visual Studio 2015 minimum
    • Update Googletest to latest release 1.10
    • Add Github Actions continuous integration solution
    • Add Valgrind memcheck tool to Travis CI
    • Remove Statement::isOk() deprecated in 2.2.0 when renamed to Statement::hasRow()
    • Replace Database::backup() "C" implementation by calling the Backup class
    • #252 Run Valgrind memcheck on Travis CI
    • #253 Keep inline functions for GCov code coverage
    • #254 Re-enable Coverity static analysis
    • #256 Fix linking with system library (libsqlite3)
    • #242 Added a getIndex method and used it (KOLANICH)
    • #257 Improve Statement unit tests coverage (bind by name with a std::string)
    • #234 support for external sqlite3 (BioDataAnalysis/emmenlau)
    • #243 adding a pure attribute to getIndex() (KOLANICH)
    Source code(tar.gz)
    Source code(zip)
  • 2.5.0(Dec 31, 2019)

    Last version before master switches to C++11. Use branch sqlitecpp-2.x for latest pre-C++11 developments.

    • Reached 100% Unit Test coverage

    • Update SQLite3 from 3.29.0 to 3.30.1 (2019-10-10)

    • #212 fix sqlite3 compile properties (jzt)

    • #219 Disable cast-function-type warning when building internal sqlite (zxey)

    • #230 Fixed installation on other than Ubuntu GNU/Linux distributions (xvitaly)

    • #228 use transitive compile definitions via cmake (BioDataAnalysis/emmenlau)

    • #232 Added support of packaged GTest for running unit tests (xvitaly)

    • #231 Added SOVERSION field for shared library (xvitaly)

    • #229 Explicitly find and link against system sqlite library (xvitaly)

    • #235 Added support for cmake dependencies and version information (BioDataAnalysis/emmenlau)

    • #249 Added SQLite header parsing functionality and associated tests (patrick--)

    Source code(tar.gz)
    Source code(zip)
  • 2.4.0(Aug 25, 2019)

    • Update SQLite3 from 3.27.2 to 3.29.0 (2019-07-10) #217
    • #191 CMake Warning line 299
    • #190 Implement move constructors
    • #192 Add wrapper for bind parameter count
    • #197 Add tuple_bind and execute_many
    • #199 Fix #156 misleading error message in exception from Statement::exec
    • #201 Add Statement::getExpandedSQL() to get the SQL text of prepared statement with bound parameters expanded
    • #211 Implement Database::backup()
    • #215 Disable implicit fallthrough warning when building internal sqlite3
    • #216 Set PROJECT_VERSION to fix CMP0048 Policy warnings
    Source code(tar.gz)
    Source code(zip)
  • 2.3.0(Mar 3, 2019)

    • #183 #187 Update SQLite3 from 3.20.1 to latest 3.27.2 (2019-02-25)
    • #179 #180 Add implicit cast operator to char and short types
    • #172 Update VariadicBind.h
    • #170 Better CMake compatibility
    • #169 Added tests for all MSVC compilers available on AppVeyor (2013, 2015, 2017)
    • #157 Add a move constructor to Database
    • #155 Fix Statement::bind truncates long integer to 32 bits on x86_64 Linux
    • #151 More cmake instructions for linux
    • #148 Allows long int for bind when used with name
    • #147 Add Statement binding for long int values
    • #141 Add comparison with sqlite_orm
    Source code(tar.gz)
    Source code(zip)
  • 2.2.0(Sep 19, 2017)

    • #143 Update SQLite3 from 3.19.3 to latest 3.20.1 (2017-08-24)
    • #142 Added tryExecuteStep and tryReset
    • #140 Removed virtual kewords from destructors
    • #139 Removed misplaced noexcept keyword
    • #138 Improved Exception class C++ conformance
    • #134 Fix warnings
    • Deprecated Statement::IsOk() to Statement::HasRow()
    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Jul 18, 2017)

    • Update SQLite3 from 3.13 to latest 3.19.3 (2017-06-08)
    • #125 Fixed Incompatibility in 3.19.0 (to use older SQLite version set the CMake variable SQLITE_USE_LEGACY_STRUCT)
    • #96 Fixed link error (inline in cpp) and compiler warnings (unused variable...)
    • #107 Added ability to open encrypted databases
    • #114 Added convenience functions for constructing objects from a row
    • #118 Added CMake install step
    • #119 Fix warnings
    • #120 Make cpplint.py Python-3 compatible
    • #100 Link libssp when targeted
    • #102 Removed redundant const
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0(Jul 26, 2016)

    • Update SQLite3 from 3.10.2 to latest 3.13 (2016-05-18)
    • Move #include <sqlite3.h> from headers to .cpp files, using only forward declarations in headers
    • Add Database::VERSION to reach SQLITE_VERSION without including sqlite3.h in application code
    • Add getLibVersion() and getLibVersionNumber() to get runtime version of the library
    • Better exception messages when Statements fail PR #84
    • Variadic templates for bind() (C++14) PR #85
    • Add Statement::bindNoCopy() methods for strings, using SQLITE_STATIC to avoid internal copy by SQLite3 PR #86
    • Add Statement::bind() overload for uint32_t, and Column::getUint() and cast operator to uint32_t PR #86
    • Use the new SQLITE_DBCONFIG_ENABLE_LOAD_EXTENSION from SQLite 3.13 for security reason
    • Rename Backup::remainingPageCount()/totalPageCount() to Backup::getRemainingPageCount()/getTotalPageCount()
    • Remove Column::errmsg() method : use Database or Statement equivalents
    • Do not force MSVC to use static runtime if unit-tests are not build
    • More unit tests, with code coverage status on the GitHub page
    Source code(tar.gz)
    Source code(zip)
  • 1.3.1(Feb 10, 2016)

  • 1.3.0(Feb 10, 2016)

  • 1.2.0(Sep 9, 2015)

  • 1.1.0(May 18, 2015)

  • 1.0.0(May 3, 2015)

Owner
Sébastien Rombauts
Senior Software Engineer using @UnrealEngine at @Darewise. Working on the UE4 Git & PlasticSCM plugins in my spare time.
Sébastien Rombauts
VSQLite++ - A welldesigned and portable SQLite3 Wrapper for C++ (C)

VSQLite++ - A welldesigned and portable SQLite3 Wrapper for C++ (C)

Vinzenz 'evilissimo' Feenstra 27 Dec 29, 2021
This is a demo for sqlite3.

说明 This is a demo for sqlite3. sqlite3 基础知识 sqlite3 命令分两类 系统命令 以 . 开头的命令 .q 退出sqlite3命令模式 .open 创建一个数据库 .databases 列出数据库 .schema 列出表结构 .tables 列出数据库中的

流浪小兵 1 Nov 24, 2021
Money Manager Ex is an easy to use, money management application built with wxWidgets

Money Manager Ex Money Manager Ex is a free, open-source, cross-platform, easy-to-use personal finance software. It primarily helps organize one's fin

Money Manager EX 1.1k May 13, 2022
Yet another SQLite wrapper for Nim

Yet another SQLite wrapper for Nim Features: Design for ARC/ORC, you don’t need to close the connection manually Use importdb macro to create helper f

Code Hz 8 Oct 25, 2021
C++11 wrapper for the LMDB embedded B+ tree database library.

lmdb++: a C++11 wrapper for LMDB This is a comprehensive C++ wrapper for the LMDB embedded database library, offering both an error-checked procedural

D.R.Y. C++ 251 Apr 16, 2022
The C++14 wrapper around sqlite library

sqlite modern cpp wrapper This library is a lightweight modern wrapper around sqlite C api . #include<iostream> #include <sqlite_modern_cpp.h> using n

null 677 May 11, 2022
Lightweight C++ wrapper for SQLite

NLDatabase Lightweight C++ wrapper for SQLite. Requirements C++11 compiler SQLite 3 Usage Let's open a database file and read some rows: #include "NLD

Raven 0 Sep 20, 2019
Simple-MySQL-API is a free and easy API to manipulate MySQL with C99 and GCC compiler under GNU/Linux OS.

Simple-MySQL-API is a free and easy API to manipulate MySQL with C99 and GCC compiler under GNU/Linux OS.

Neptune 7 Apr 24, 2022
GridDB is a next-generation open source database that makes time series IoT and big data fast,and easy.

Overview GridDB is Database for IoT with both NoSQL interface and SQL Interface. Please refer to GridDB Features Reference for functionality. This rep

GridDB 1.7k May 8, 2022
A lightweight header-only C++11 library for quick and easy SQL querying with QtSql classes.

EasyQtSql EasyQtSql is a lightweight header-only C++11 library for quick and easy SQL querying with QtSql classes. Features: Header only C++11 library

null 42 May 6, 2022
Tntdb is a c++-class-library for easy access to databases

Tntdb is a c++-class-library for easy access to databases

Tommi Mäkitalo 30 Jan 23, 2022
A simple flutter application to maintain basic personal notes. A showcase on how to use fastAPI as backend

Flutter App Notes with FastApi as backend A simple flutter application to maintain basic personal notes. The backend of this app was built with FastAP

António Pedro 4 May 4, 2022
A friendly and lightweight C++ database library for MySQL, PostgreSQL, SQLite and ODBC.

QTL QTL is a C ++ library for accessing SQL databases and currently supports MySQL, SQLite, PostgreSQL and ODBC. QTL is a lightweight library that con

null 148 May 9, 2022
ObjectBox C and C++: super-fast database for objects and structs

ObjectBox Embedded Database for C and C++ ObjectBox is a superfast C and C++ database for embedded devices (mobile and IoT), desktop and server apps.

ObjectBox 127 May 6, 2022
Reading, thinking and coding about MySQL,InnoDB and MGR

MySQL 8.0.27 Review by adzfolc Notifications In this doc, I will make the rules of my code review and period summary for later review. This chapter ma

null 5 May 3, 2022
dqlite is a C library that implements an embeddable and replicated SQL database engine with high-availability and automatic failover

dqlite dqlite is a C library that implements an embeddable and replicated SQL database engine with high-availability and automatic failover. The acron

Canonical 3k May 13, 2022
MySQL Server, the world's most popular open source database, and MySQL Cluster, a real-time, open source transactional database.

Copyright (c) 2000, 2021, Oracle and/or its affiliates. This is a release of MySQL, an SQL database server. License information can be found in the

MySQL 7.8k May 11, 2022
ESE is an embedded / ISAM-based database engine, that provides rudimentary table and indexed access.

Extensible-Storage-Engine A Non-SQL Database Engine The Extensible Storage Engine (ESE) is one of those rare codebases having proven to have a more th

Microsoft 778 May 7, 2022
Modern, asynchronous, and wicked fast C++11 client for Redis

redox Modern, asynchronous, and wicked fast C++11 client for Redis [] (https://travis-ci.org/hmartiro/redox) Redox is a C++ interface to the Redis key

Hayk Martiros 376 Mar 9, 2022