Pull in full sqlite_modern_cpp repo for the license as it is not attached to source files

This commit is contained in:
Saood Karim
2025-08-17 08:25:37 -05:00
parent a3b174b69a
commit ed9504bd92
41 changed files with 2654 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#include <iostream>
#include <cstdlib>
#include <sqlite_modern_cpp.h>
#include <catch2/catch.hpp>
using namespace sqlite;
using namespace std;
TEST_CASE("binding named parameters works", "[named]") {
database db(":memory:");
db << "CREATE TABLE foo (a,b);";
int a = 1;
db << "INSERT INTO foo VALUES (:first,:second)" << named_parameter(":second", 2) << named_parameter(":first", a);
db << "SELECT b FROM foo WHERE a=?;" << 1 >> a;
REQUIRE(a == 2);
}