text stringlengths 24 1.04M | metadata stringlengths 233 497 |
|---|---|
### File: tests/operators/is_null.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("Is null") {
struct User {
int id = 0;
std::unique_ptr<std::string> name;
#ifndef SQLITE_ORM_AGGREGATE_NSDMI_SUPPORTED
User() = default;
U... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/operators/is_null.cpp", "license": "mit", "size": 1036} |
### File: tests/operators/like.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("Like operator") {
struct User {
int id = 0;
std::string name;
#ifndef SQLITE_ORM_AGGREGATE_NSDMI_SUPPORTED
User() = default;
User(int id, st... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/operators/like.cpp", "license": "mit", "size": 2073} |
### File: tests/operators/not_operator.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("Not operator") {
struct Object {
int id = 0;
#ifndef SQLITE_ORM_AGGREGATE_NSDMI_SUPPORTED
Object() = default;
Object(int id) : id{id} {}
#en... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/operators/not_operator.cpp", "license": "mit", "size": 2411} |
### File: tests/pointer_passing_interface.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
using std::unique_ptr;
#ifdef SQLITE_ORM_INLINE_VARIABLES_SUPPORTED
namespace {
struct delete_int64 {
static int64 lastSelectedId;
static bool deleted;
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/pointer_passing_interface.cpp", "license": "mit", "size": 5665} |
### File: tests/pragma_tests.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <cstdio> // ::remove
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("Journal mode") {
auto filename = "journal_mode.sqlite";
::remove(filename);
auto storage = make_storage(filename);
auto storageCopy... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/pragma_tests.cpp", "license": "mit", "size": 4669} |
### File: tests/prepared_statement_tests/column_names.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
#ifdef SQLITE_ORM_STRING_VIEW_SUPPORTED
using namespace std::literals;
TEST_CASE("column_name_method") {
struct UserIdAlias : alias_tag {
static const... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/column_names.cpp", "license": "mit", "size": 948} |
### File: tests/prepared_statement_tests/get.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
TEST_CASE("Prepared get") {
using namespace PreparedStatementTests;
using Catch::Matchers::ContainsSubstring;
using Catch::Matchers:... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/get.cpp", "license": "mit", "size": 5058} |
### File: tests/prepared_statement_tests/get_all.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
TEST_CASE("Prepared get all") {
using namespace PreparedStatementTests;
using Catch::Matchers::UnorderedEquals;
const int defau... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/get_all.cpp", "license": "mit", "size": 9031} |
### File: tests/prepared_statement_tests/get_all_optional.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
#ifdef SQLITE_ORM_OPTIONAL_SUPPORTED
TEST_CASE("Prepared get all optional") {
using namespace PreparedStatementTests;
using... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/get_all_optional.cpp", "license": "mit", "size": 5610} |
### File: tests/prepared_statement_tests/get_all_pointer.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
TEST_CASE("Prepared get all pointer") {
using namespace PreparedStatementTests;
using Catch::Matchers::UnorderedEquals;
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/get_all_pointer.cpp", "license": "mit", "size": 5862} |
### File: tests/prepared_statement_tests/get_optional.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
#ifdef SQLITE_ORM_OPTIONAL_SUPPORTED
TEST_CASE("Prepared get optional") {
using namespace PreparedStatementTests;
using Catch::... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/get_optional.cpp", "license": "mit", "size": 5581} |
### File: tests/prepared_statement_tests/get_pointer.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
TEST_CASE("Prepared get pointer") {
using namespace PreparedStatementTests;
using Catch::Matchers::UnorderedEquals;
const i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/get_pointer.cpp", "license": "mit", "size": 5181} |
### File: tests/prepared_statement_tests/insert.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
TEST_CASE("Prepared insert") {
using namespace PreparedStatementTests;
using Catch::Matchers::UnorderedEquals;
struct Artist {
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/insert.cpp", "license": "mit", "size": 10265} |
### File: tests/prepared_statement_tests/insert_explicit.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
TEST_CASE("Prepared insert explicit") {
using namespace PreparedStatementTests;
using Catch::Matchers::ContainsSubstring;
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/insert_explicit.cpp", "license": "mit", "size": 5223} |
### File: tests/prepared_statement_tests/insert_range.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <algorithm>
#include "prepared_common.h"
using namespace sqlite_orm;
TEST_CASE("Prepared insert range") {
using namespace PreparedStatementTests;
using Catch::Matchers::Contai... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/insert_range.cpp", "license": "mit", "size": 6255} |
### File: tests/prepared_statement_tests/prepared_common.h
#pragma once
#include <string> // std::string
#include <tuple> // std::ignore
#include <sqlite_orm/sqlite_orm.h>
#include <ostream> // std::ostream
namespace PreparedStatementTests {
struct User {
int id = 0;
std::string name;
#ifnd... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/prepared_common.h", "license": "mit", "size": 2036} |
### File: tests/prepared_statement_tests/remove.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
TEST_CASE("Prepared remove") {
using namespace PreparedStatementTests;
using Catch::Matchers::UnorderedEquals;
const int default... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/remove.cpp", "license": "mit", "size": 4336} |
### File: tests/prepared_statement_tests/remove_all.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
TEST_CASE("Prepared remove all") {
using namespace PreparedStatementTests;
using Catch::Matchers::UnorderedEquals;
const int... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/remove_all.cpp", "license": "mit", "size": 7913} |
### File: tests/prepared_statement_tests/replace.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
TEST_CASE("Prepared replace") {
using namespace PreparedStatementTests;
using Catch::Matchers::UnorderedEquals;
const int defau... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/replace.cpp", "license": "mit", "size": 7092} |
### File: tests/prepared_statement_tests/replace_range.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
TEST_CASE("Prepared replace range") {
using namespace PreparedStatementTests;
using Catch::Matchers::UnorderedEquals;
con... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/replace_range.cpp", "license": "mit", "size": 5905} |
### File: tests/prepared_statement_tests/select.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
TEST_CASE("Prepared select") {
using namespace PreparedStatementTests;
using Catch::Matchers::UnorderedEquals;
const int default... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/select.cpp", "license": "mit", "size": 14329} |
### File: tests/prepared_statement_tests/update.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
TEST_CASE("Prepared update") {
using namespace PreparedStatementTests;
using Catch::Matchers::UnorderedEquals;
const int default... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/update.cpp", "license": "mit", "size": 4429} |
### File: tests/prepared_statement_tests/update_all.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "prepared_common.h"
using namespace sqlite_orm;
TEST_CASE("Prepared update all") {
using namespace PreparedStatementTests;
using Catch::Matchers::UnorderedEquals;
const int... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/prepared_statement_tests/update_all.cpp", "license": "mit", "size": 8030} |
### File: tests/private_getters_tests.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <iostream>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("Issue 343") {
class A {
public:
A() = default;
A(int id_, std::string name_) : name(std::move(name_)), id(id_) {}
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/private_getters_tests.cpp", "license": "mit", "size": 1016} |
### File: tests/row_id.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("Row id") {
struct SimpleTable {
std::string letter;
std::string desc;
};
auto storage = make_storage(
"rowid.sqlite",
make_table("tbl1", ma... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/row_id.cpp", "license": "mit", "size": 2064} |
### File: tests/select_constraints_tests.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
namespace {
struct Employee {
int id;
std::string name;
int age;
std::string address; // optional
double salary; // optional
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/select_constraints_tests.cpp", "license": "mit", "size": 22453} |
### File: tests/simple_query.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("Simple query") {
auto storage = make_storage("");
{
// SELECT 1
auto one = storage.select(1);
REQUIRE(one.size() == 1);
REQUIRE(one.front(... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/simple_query.cpp", "license": "mit", "size": 1498} |
### File: tests/statement_serializer_tests/aggregate_functions.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer aggregate functions") {
using internal::serialize;
struct User {
int id = 0;
std::string name;
}... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/aggregate_functions.cpp", "license": "mit", "size": 10474} |
### File: tests/statement_serializer_tests/alias_extractor.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
using internal::alias_extractor;
TEST_CASE("alias extractor") {
struct User {};
SECTION("column alias") {
REQUIRE(alias_extractor<colalias_a>::... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/alias_extractor.cpp", "license": "mit", "size": 663} |
### File: tests/statement_serializer_tests/arithmetic_operators.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer arithmetic operators") {
internal::db_objects_tuple<> storage;
internal::serializer_context<internal::db_objects_tu... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/arithmetic_operators.cpp", "license": "mit", "size": 1564} |
### File: tests/statement_serializer_tests/ast/excluded.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("excluded") {
using internal::serialize;
struct Vocabulary {
std::string word;
int count = 0;
};
auto table = make_table(... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/ast/excluded.cpp", "license": "mit", "size": 1090} |
### File: tests/statement_serializer_tests/ast/set.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("set") {
struct User {
int id = 0;
std::string name;
};
auto table = make_table("users", make_column("id", &User::id, primary_key(... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/ast/set.cpp", "license": "mit", "size": 2199} |
### File: tests/statement_serializer_tests/ast/upsert_clause.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
#if SQLITE_VERSION_NUMBER >= 3024000
TEST_CASE("upsert_clause") {
using internal::serialize;
struct Vocabulary {
std::string word;
int... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/ast/upsert_clause.cpp", "license": "mit", "size": 5110} |
### File: tests/statement_serializer_tests/base_types.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer base types") {
internal::db_objects_tuple<> storage;
internal::serializer_context<internal::db_objects_tuple<>> context{stora... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/base_types.cpp", "license": "mit", "size": 1833} |
### File: tests/statement_serializer_tests/bindables.cpp
#include <type_traits>
#include <array>
#include <tuple>
#include <algorithm> // std::fill_n
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using std::array;
using std::index_sequence;
using std::index_sequence_for;
using std::make_index_se... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/bindables.cpp", "license": "mit", "size": 9822} |
### File: tests/statement_serializer_tests/collate.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer collate") {
internal::db_objects_tuple<> storage;
internal::serializer_context<internal::db_objects_tuple<>> context{storage};
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/collate.cpp", "license": "mit", "size": 681} |
### File: tests/statement_serializer_tests/column_constraints/autoincrement.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer autoincrement") {
internal::db_objects_tuple<> storage;
internal::serializer_context<internal::db_objec... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/column_constraints/autoincrement.cpp", "license": "mit", "size": 393} |
### File: tests/statement_serializer_tests/column_constraints/check.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer check") {
SECTION("greater than") {
struct Table {
int col1 = 0;
std::string col2;
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/column_constraints/check.cpp", "license": "mit", "size": 2576} |
### File: tests/statement_serializer_tests/column_constraints/default.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer default") {
internal::db_objects_tuple<> storage;
internal::serializer_context<internal::db_objects_tuple<>> ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/column_constraints/default.cpp", "license": "mit", "size": 1064} |
### File: tests/statement_serializer_tests/column_constraints/generated.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
#if SQLITE_VERSION_NUMBER >= 3031000
TEST_CASE("issue893") {
struct Object {
std::string name;
int nameLen;
int number;... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/column_constraints/generated.cpp", "license": "mit", "size": 3102} |
### File: tests/statement_serializer_tests/column_constraints/primary_key.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer primary key") {
std::string value;
decltype(value) expected;
SECTION("empty") {
internal::db_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/column_constraints/primary_key.cpp", "license": "mit", "size": 9641} |
### File: tests/statement_serializer_tests/column_constraints/unique.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer unique") {
internal::db_objects_tuple<> storage;
internal::serializer_context<internal::db_objects_tuple<>> co... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/column_constraints/unique.cpp", "license": "mit", "size": 362} |
### File: tests/statement_serializer_tests/column_names.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer column names") {
SECTION("by member field pointer") {
struct User {
int id = 0;
std::string nam... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/column_names.cpp", "license": "mit", "size": 7426} |
### File: tests/statement_serializer_tests/comparison_operators.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer comparison operators") {
internal::db_objects_tuple<> storage;
internal::serializer_context<internal::db_objects_tu... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/comparison_operators.cpp", "license": "mit", "size": 2519} |
### File: tests/statement_serializer_tests/conditions.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer conditions") {
std::string value, expected;
SECTION("using") {
struct User {
int64 id;
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/conditions.cpp", "license": "mit", "size": 1380} |
### File: tests/statement_serializer_tests/core_functions.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer core functions") {
internal::db_objects_tuple<> storage;
internal::serializer_context<internal::db_objects_tuple<>> conte... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/core_functions.cpp", "license": "mit", "size": 13084} |
### File: tests/statement_serializer_tests/foreign_key.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <type_traits> // std::is_same
#include "../static_tests/static_tests_storage_traits.h"
using namespace sqlite_orm;
#if SQLITE_VERSION_NUMBER >= 3006019
TEST_CASE("statement_seria... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/foreign_key.cpp", "license": "mit", "size": 18130} |
### File: tests/statement_serializer_tests/indexed_column.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer indexed_column") {
struct User {
int id = 0;
std::string name;
};
auto table = make_table("users", ma... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/indexed_column.cpp", "license": "mit", "size": 1626} |
### File: tests/statement_serializer_tests/logical_operators.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer logical operators") {
struct User {
int id = 0;
std::string name;
};
auto table = make_table("user... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/logical_operators.cpp", "license": "mit", "size": 3382} |
### File: tests/statement_serializer_tests/rowid.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer rowid") {
{
internal::db_objects_tuple<> storage;
internal::serializer_context<internal::db_objects_tuple<>> context{s... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/rowid.cpp", "license": "mit", "size": 369} |
### File: tests/statement_serializer_tests/schema/index.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer index") {
struct User {
int id = 0;
std::string name;
};
auto table = make_table("users", make_column("... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/schema/index.cpp", "license": "mit", "size": 3026} |
### File: tests/statement_serializer_tests/schema/new_old.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer new/old") {
using internal::serialize;
struct User {
int id = 0;
std::string name;
};
auto table ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/schema/new_old.cpp", "license": "mit", "size": 947} |
### File: tests/statement_serializer_tests/schema/raise.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer raise") {
using internal::serialize;
std::string value;
decltype(value) expected;
internal::db_objects_tuple<> st... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/schema/raise.cpp", "license": "mit", "size": 1057} |
### File: tests/statement_serializer_tests/schema/trigger.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer trigger") {
using internal::serialize;
struct Lead {
int id = 0;
std::string firstName;
std::stri... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/schema/trigger.cpp", "license": "mit", "size": 2012} |
### File: tests/statement_serializer_tests/select_constraints.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer select constraints") {
using internal::serialize;
struct User {
int id = 0;
std::string name;
};
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/select_constraints.cpp", "license": "mit", "size": 5481} |
### File: tests/statement_serializer_tests/statements/insert_replace.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
template<class E1, class E2>
static void assert_same(const E1&, const E2&) {
STATIC_REQUIRE(std::is_same<E1, E2>::value);
}
TEST_CASE("statement_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/statements/insert_replace.cpp", "license": "mit", "size": 21995} |
### File: tests/statement_serializer_tests/statements/remove.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer remove") {
using internal::serialize;
struct User {
int id = 0;
std::string name;
};
auto tabl... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/statements/remove.cpp", "license": "mit", "size": 1055} |
### File: tests/statement_serializer_tests/statements/remove_all.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer remove_all") {
using internal::serialize;
struct User {
int id = 0;
std::string name;
};
a... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/statements/remove_all.cpp", "license": "mit", "size": 1258} |
### File: tests/statement_serializer_tests/statements/select.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer select_t") {
using internal::serialize;
struct User {
int id = 0;
std::string name;
};
auto ta... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/statements/select.cpp", "license": "mit", "size": 8721} |
### File: tests/statement_serializer_tests/statements/update.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer update") {
using internal::serialize;
struct A {
int address = 0;
int type = 0;
int index = 0;... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/statements/update.cpp", "license": "mit", "size": 6890} |
### File: tests/statement_serializer_tests/statements/update_all.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("statement_serializer update_all") {
using internal::serialize;
struct Contact {
int id = 0;
std::string firstName;
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/statement_serializer_tests/statements/update_all.cpp", "license": "mit", "size": 2871} |
### File: tests/static_tests/aggregate_function_return_types.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <type_traits> // std::is_same
using namespace sqlite_orm;
TEST_CASE("Aggregate function return types") {
struct User {
int id;
std::string name;
i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/aggregate_function_return_types.cpp", "license": "mit", "size": 6034} |
### File: tests/static_tests/alias.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <type_traits> // std::is_same
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
using internal::alias_column_t;
using internal::alias_holder;
using internal::as_t;
using internal::column_alias;
using internal::column_pointer... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/alias.cpp", "license": "mit", "size": 1047} |
### File: tests/static_tests/arithmetic_operators_result_type.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <type_traits> // std::is_same
using namespace sqlite_orm;
TEST_CASE("Arithmetic operators result type") {
STATIC_REQUIRE(
std::is_same<internal::column_result_t<i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/arithmetic_operators_result_type.cpp", "license": "mit", "size": 763} |
### File: tests/static_tests/bindable_filter.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <type_traits> // std::is_same
#ifdef SQLITE_ORM_OPTIONAL_SUPPORTED
#include <optional>
#endif
using namespace sqlite_orm;
namespace {
struct Custom {};
template<class Elem>
class ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/bindable_filter.cpp", "license": "mit", "size": 3037} |
### File: tests/static_tests/column.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "static_tests_common.h"
using namespace sqlite_orm;
TEST_CASE("Column") {
{
using column_type = decltype(make_column("id", &User::id));
STATIC_REQUIRE(std::tuple_size<column_type::c... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/column.cpp", "license": "mit", "size": 4655} |
### File: tests/static_tests/column_result_t.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <type_traits> // std::is_same
using namespace sqlite_orm;
template<class Type, class E>
void do_assert() {
STATIC_REQUIRE(std::is_same<Type, E>::value);
}
template<class DBOs, class E, c... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/column_result_t.cpp", "license": "mit", "size": 4878} |
### File: tests/static_tests/compound_operators.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "static_tests_common.h"
using namespace sqlite_orm;
TEST_CASE("Compound operators") {
auto unionValue = union_(select(&User::id), select(&Token::id));
STATIC_REQUIRE(internal::is_ba... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/compound_operators.cpp", "license": "mit", "size": 901} |
### File: tests/static_tests/core_function_return_types.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <type_traits> // std::is_same
#include <cstddef> // nullptr_t
using namespace sqlite_orm;
using std::is_same;
using std::nullptr_t;
#if __cpp_lib_type_trait_variable_templates >= ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/core_function_return_types.cpp", "license": "mit", "size": 2898} |
### File: tests/static_tests/foreign_key.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <type_traits> // std::is_same
#include <string> // std::string
#include <type_traits> // std::is_same
#include "static_tests_storage_traits.h"
using namespace sqlite_orm;
TEST_CASE("foreign... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/foreign_key.cpp", "license": "mit", "size": 7137} |
### File: tests/static_tests/function_static_tests.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <type_traits> // std::is_same
using namespace sqlite_orm;
using internal::is_aggregate_function_v;
using internal::is_scalar_function_v;
TEST_CASE("function static") {
SECTION("scal... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/function_static_tests.cpp", "license": "mit", "size": 10860} |
### File: tests/static_tests/functional/mpl.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("mpl") {
using mpl_is_same = mpl::quote_fn<std::is_same>;
STATIC_REQUIRE(!mpl::is_metafunction_class_v<std::true_type>);
STATIC_REQUIRE(mpl::is_metafunc... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/functional/mpl.cpp", "license": "mit", "size": 2237} |
### File: tests/static_tests/functional/same_or_void.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <type_traits> // std::is_same
#include <string> // std::string
using namespace sqlite_orm;
TEST_CASE("same_or_void") {
using internal::same_or_void;
// one argument
S... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/functional/same_or_void.cpp", "license": "mit", "size": 1585} |
### File: tests/static_tests/functional/static_if_tests.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
using internal::call_if_constexpr;
using internal::static_if;
TEST_CASE("static_if") {
using called_pair = std::pair<int, int>;
called_pair called;
{ ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/functional/static_if_tests.cpp", "license": "mit", "size": 2296} |
### File: tests/static_tests/functional/tuple_conc.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <string> // std::string
#include <type_traits> // std::is_same
using namespace sqlite_orm;
TEST_CASE("Tuple conc") {
using namespace internal;
{
using TupleL = std::tu... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/functional/tuple_conc.cpp", "license": "mit", "size": 2184} |
### File: tests/static_tests/functional/tuple_filter.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <type_traits> // std::is_same
using namespace sqlite_orm;
using std::make_tuple;
namespace {
struct User {
int id = 0;
std::string name;
};
}
TEST_CASE("tuple... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/functional/tuple_filter.cpp", "license": "mit", "size": 3372} |
### File: tests/static_tests/functional/tuple_traits.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
using internal::check_if_tuple_has;
using internal::check_if_tuple_has_template;
using internal::check_if_tuple_has_type;
using internal::default_t;
using internal::is... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/functional/tuple_traits.cpp", "license": "mit", "size": 945} |
### File: tests/static_tests/functional/tuple_transform.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <type_traits> // std::is_same
using namespace sqlite_orm;
TEST_CASE("tuple_helper static") {
SECTION("tuple_transformer") {
struct Table {
int64_t id;
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/functional/tuple_transform.cpp", "license": "mit", "size": 1077} |
### File: tests/static_tests/is_bindable.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <memory> // std::unique_ptr, std::shared_ptr
#include <string> // std::string
#ifdef SQLITE_ORM_OPTIONAL_SUPPORTED
#include <optional> // std::optional
#endif // SQLITE_ORM_OPTIONAL_SUPPORTED
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/is_bindable.cpp", "license": "mit", "size": 4129} |
### File: tests/static_tests/is_column_with_insertable_primary_key.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
using namespace internal;
template<class Tpl>
using insertable_index_sequence = filter_tuple_sequence_t<Tpl,
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/is_column_with_insertable_primary_key.cpp", "license": "mit", "size": 1985} |
### File: tests/static_tests/is_primary_key_insertable.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <type_traits> // std::std::decay
using namespace sqlite_orm;
TEST_CASE("is_primary_key_insertable") {
struct User {
int id;
std::string username;
std::st... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/is_primary_key_insertable.cpp", "license": "mit", "size": 1122} |
### File: tests/static_tests/is_printable.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <memory> // std::unique_ptr, std::shared_ptr
#include <string> // std::string
#ifdef SQLITE_ORM_OPTIONAL_SUPPORTED
#include <optional> // std::optional
#endif // SQLITE_ORM_OPTIONAL_SUPPORTED... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/is_printable.cpp", "license": "mit", "size": 2712} |
### File: tests/static_tests/iterator_t.cpp
#include <type_traits>
#include <utility>
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
namespace {
struct User {
int id = 0;
std::string name;
};
}
TEST_CASE("iterator_t") {
using storage = declt... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/iterator_t.cpp", "license": "mit", "size": 1204} |
### File: tests/static_tests/member_traits_tests.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("member_traits_tests") {
using internal::getter_field_type_t;
using internal::is_getter;
using internal::is_setter;
using internal::member_field... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/member_traits_tests.cpp", "license": "mit", "size": 16062} |
### File: tests/static_tests/node_tuple.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <type_traits> // std::is_same
using namespace sqlite_orm;
using internal::alias_holder;
using internal::column_alias;
using internal::column_pointer;
template<class T>
struct is_pair : std::false_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/node_tuple.cpp", "license": "mit", "size": 44747} |
### File: tests/static_tests/operators_adl.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using sqlite_orm::c;
using sqlite_orm::internal::binary_operator;
using sqlite_orm::internal::greater_or_equal_t;
using sqlite_orm::internal::greater_than_t;
using sqlite_orm::internal::is_equal_t;
using s... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/operators_adl.cpp", "license": "mit", "size": 3596} |
### File: tests/static_tests/select_return_type.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include "static_tests_common.h"
#include "static_tests_storage_traits.h"
using namespace sqlite_orm;
TEST_CASE("Select return types") {
auto storage = make_storage("", make_table("users", make_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/select_return_type.cpp", "license": "mit", "size": 2813} |
### File: tests/static_tests/static_tests_common.h
#pragma once
struct User {
int id;
const int& getIdByRefConst() const {
return this->id;
}
const int& getIdByRef() {
return this->id;
}
int getIdByValConst() const {
return this->id;
}
void setIdByVal(int id_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/static_tests_common.h", "license": "mit", "size": 502} |
### File: tests/static_tests/static_tests_storage_traits.h
#pragma once
/*
* All symbols used to be in dev/storage_traits.h up to sqlite_orm 1.7.
* Because they were not used, they were moved to unit tests,
* and for simplicitly the namespace sqlite_orm::internal::storage_traits was kept.
*/
#include <ty... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/static_tests/static_tests_storage_traits.h", "license": "mit", "size": 5399} |
### File: tests/storage_non_crud_tests.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("explicit from") {
struct User {
int id = 0;
std::string name;
#ifndef SQLITE_ORM_AGGREGATE_NSDMI_SUPPORTED
User() = default;
User(in... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/storage_non_crud_tests.cpp", "license": "mit", "size": 21717} |
### File: tests/storage_tests.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("busy handler") {
auto storage = make_storage({});
storage.busy_handler([](int /*timesCount*/) {
return 0;
});
}
TEST_CASE("drop table") {
struct User {
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/storage_tests.cpp", "license": "mit", "size": 8030} |
### File: tests/sync_schema_tests.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <iostream>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
/**
* this is the deal: assume we have a `users` table with schema
* `CREATE TABLE users (id INTEGER NOT NULL PRIMARY KEY, name TEXT NOT NULL, category_id INTEGE... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/sync_schema_tests.cpp", "license": "mit", "size": 23881} |
### File: tests/table_name_collector.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
using internal::alias_extractor;
TEST_CASE("table name collector") {
struct User {
int id = 0;
std::string name;
};
auto table = make_table("users", make... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/table_name_collector.cpp", "license": "mit", "size": 1702} |
### File: tests/table_tests.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("table::find_column_name") {
SECTION("fields") {
struct Contact {
int id = 0;
std::string firstName;
std::string lastName;
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/table_tests.cpp", "license": "mit", "size": 8749} |
### File: tests/tests.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <vector> // std::vector
#include <string> // std::string
#include <memory> // std::unique_ptr
#include <cstdio> // remove
#include <numeric> // std::iota
#include <algorithm> // std::fill
using namespace ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/tests.cpp", "license": "mit", "size": 9003} |
### File: tests/tests2.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#ifdef SQLITE_ORM_OPTIONAL_SUPPORTED
#include <optional> // std::optional
#endif // SQLITE_ORM_OPTIONAL_SUPPORTED
#include <memory> // std::default_delete
#include <stdlib.h> // free()
using namespace sqlite_orm;
using st... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/tests2.cpp", "license": "mit", "size": 20156} |
### File: tests/tests3.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
TEST_CASE("Multi order by") {
struct Singer {
int id;
std::string name;
std::string gender;
};
auto storage = make_storage("",
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/tests3.cpp", "license": "mit", "size": 13627} |
### File: tests/tests4.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <algorithm> // std::count_if
#ifdef SQLITE_ORM_OPTIONAL_SUPPORTED
#include <optional> // std::optional
#endif // SQLITE_ORM_OPTIONAL_SUPPORTED
using namespace sqlite_orm;
TEST_CASE("Unique ptr in update") {
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/tests4.cpp", "license": "mit", "size": 12075} |
### File: tests/tests5.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
#include <numeric> // std::iota
using namespace sqlite_orm;
TEST_CASE("Iterate blob") {
struct Test {
int64_t id;
std::vector<char> key;
};
struct TestComparator {
bool operator()(const... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/tests5.cpp", "license": "mit", "size": 12827} |
### File: tests/transaction_tests.cpp
#include <sqlite_orm/sqlite_orm.h>
#include <catch2/catch_all.hpp>
using namespace sqlite_orm;
namespace {
struct Object {
int id = 0;
std::string name;
#ifndef SQLITE_ORM_AGGREGATE_NSDMI_SUPPORTED
Object() = default;
Object(int id, std::strin... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "minhanghuang/sqlite_orm", "path": "tests/transaction_tests.cpp", "license": "mit", "size": 7055} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.