Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions tests/postgres/test_aggregations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_aggregations {

Expand All @@ -27,10 +28,7 @@ TEST(postgres, test_aggregations) {
Person{
.id = 3, .first_name = "Maggie", .last_name = "Simpson", .age = 0}});

const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_aggregations_with_nullable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_aggregations_with_nullable {

Expand All @@ -26,10 +27,7 @@ TEST(postgres, test_aggregations_with_nullable) {
Person{.id = 2, .first_name = "Lisa", .last_name = "Simpson", .age = 8},
Person{.id = 3, .first_name = "Maggie", .last_name = "Simpson"}});

const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_auto_incr_primary_key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_auto_incr_primary_key {

Expand All @@ -24,10 +25,7 @@ TEST(postgres, test_auto_incr_primary_key) {
Person{.first_name = "Lisa", .last_name = "Simpson", .age = 8},
Person{.first_name = "Maggie", .last_name = "Simpson", .age = 0}});

const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_boolean.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_boolean {

Expand Down Expand Up @@ -35,10 +36,7 @@ TEST(postgres, test_boolean) {
.last_name = "Simpson",
.has_children = false}});

const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_boolean_conditions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_boolean_conditions {

Expand Down Expand Up @@ -35,10 +36,7 @@ TEST(postgres, test_boolean_conditions) {
.last_name = "Simpson",
.has_children = false}});

const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_boolean_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_boolean_update {

Expand Down Expand Up @@ -35,10 +36,7 @@ TEST(postgres, test_boolean_update) {
.last_name = "Simpson",
.has_children = false}});

const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_cache {

Expand All @@ -16,10 +17,7 @@ struct User {
};

TEST(postgres, test_cache) {
const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

const auto conn = sqlgen::postgres::connect(credentials);

Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_create_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_create_index {

Expand All @@ -18,10 +19,7 @@ struct Person {
};

TEST(postgres, test_create_index) {
const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_create_index_where.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_create_index_where {

Expand All @@ -18,10 +19,7 @@ struct Person {
};

TEST(postgres, test_create_index_where) {
const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_create_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_create_table {

Expand All @@ -18,10 +19,7 @@ struct Person {
};

TEST(postgres, test_create_table) {
const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_create_table_as.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_create_table_as {

Expand All @@ -23,10 +24,7 @@ struct Name {
};

TEST(postgres, test_create_table_as) {
const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_create_view_as.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_create_view_as {

Expand All @@ -28,10 +29,7 @@ struct Name {
};

TEST(postgres, test_create_view_as) {
const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_delete_from.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_delete_from {

Expand All @@ -28,10 +29,7 @@ TEST(postgres, test_delete_from) {
Person{
.id = 4, .first_name = "Hugo", .last_name = "Simpson", .age = 10}});

const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_dynamic_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace sqlgen::parsing {

Expand Down Expand Up @@ -85,10 +86,7 @@ TEST(postgres, test_dynamic_type) {
Person{.first_name = "Lisa", .last_name = "Simpson", .age = 8},
Person{.first_name = "Maggie", .last_name = "Simpson", .age = 0}});

const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_enum_crosstable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_enum_cross_table {
enum class AccessRestriction { PUBLIC = 1, INTERNAL = 2, CONFIDENTIAL = 3 };
Expand Down Expand Up @@ -69,10 +70,7 @@ TEST(postgres, test_enum_cross_table) {
.path = "/documents/powerplant/release_notes.txt"},
});

const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();
const auto conn = postgres::connect(credentials);
conn.and_then(drop<Employee> | if_exists)
.and_then(drop<Document> | if_exists);
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_enum_lookup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_enum_lookup {

Expand Down Expand Up @@ -49,10 +50,7 @@ TEST(postgres, test_enum_lookup) {
.path = "/documents/powerplant/release_notes.txt"},
});

const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_enum_namespace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_enum_namespace {
namespace first {
Expand Down Expand Up @@ -36,10 +37,7 @@ TEST(postgres, test_enum_namespace) {
.enum_two = second::IdenticallyNamed::VALUE5},
});

const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();
const auto conn = postgres::connect(credentials);
conn.and_then(drop<MultiStruct> | if_exists);

Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_error_handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_error_handling {

Expand All @@ -28,10 +29,7 @@ TEST(postgres, test_error_handling) {
Person{
.id = 4, .first_name = "Hugo", .last_name = "Simpson", .age = 10}});

const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_foreign_key.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_foreign_key {

Expand Down Expand Up @@ -39,10 +40,7 @@ TEST(postgres, test_foreign_key) {
Relationship{.parent_id = 1, .child_id = 3},
Relationship{.parent_id = 1, .child_id = 4}});

const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
6 changes: 2 additions & 4 deletions tests/postgres/test_full_join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <sqlgen.hpp>
#include <sqlgen/postgres.hpp>
#include <vector>
#include "test_helpers.hpp"

namespace test_full_join {

Expand Down Expand Up @@ -37,10 +38,7 @@ TEST(postgres, test_full_join) {
Pet{.id = 3, .name = "Mr. Teeny", .owner_id = 99},
});

const auto credentials = sqlgen::postgres::Credentials{.user = "postgres",
.password = "password",
.host = "localhost",
.dbname = "postgres"};
const auto credentials = sqlgen::postgres::test::make_credentials();

using namespace sqlgen;
using namespace sqlgen::literals;
Expand Down
Loading
Loading