Skip to content

Commit

Permalink
Postgres col names now match registered col names.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwhittaker committed Apr 14, 2017
1 parent a96fb95 commit 022c9e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/lineagedb/mock_pqxx_client_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ TEST(MockPqxxClient, AddCollection) {
hash bigint NOT NULL,
time_inserted integer NOT NULL,
time_deleted integer,
col_0 integer NOT NULL,
col_1 char(1) NOT NULL,
col_2 boolean NOT NULL,
x integer NOT NULL,
c char(1) NOT NULL,
b boolean NOT NULL,
PRIMARY KEY (hash, time_inserted)
);
)");
Expand Down
3 changes: 2 additions & 1 deletion src/lineagedb/pqxx_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ class InjectablePqxxClient {
std::vector<std::string> types = SqlTypes<Ts...>();
std::vector<std::string> columns;
for (std::size_t i = 0; i < types.size(); ++i) {
columns.push_back(fmt::format("col_{} {} NOT NULL", i, types[i]));
columns.push_back(
fmt::format("{} {} NOT NULL", column_names[i], types[i]));
}
ExecuteQuery("AddCollectionTable",
fmt::format(R"(
Expand Down

0 comments on commit 022c9e7

Please sign in to comment.