Skip to content

Commit

Permalink
Fix table name
Browse files Browse the repository at this point in the history
  • Loading branch information
d-frey committed Dec 19, 2024
1 parent 29325b4 commit eccd5aa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/test/pq/chunk_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ namespace
// open a connection to the database
const auto conn = tao::pq::connection::create( connection_string );

conn->execute( "DROP TABLE IF EXISTS tao_single_row_mode" );
conn->execute( "CREATE TABLE tao_single_row_mode ( name TEXT PRIMARY KEY, age INTEGER NOT NULL )" );
conn->execute( "DROP TABLE IF EXISTS tao_chunk_mode" );
conn->execute( "CREATE TABLE tao_chunk_mode ( name TEXT PRIMARY KEY, age INTEGER NOT NULL )" );

conn->prepare( "insert_user", "INSERT INTO tao_single_row_mode ( name, age ) VALUES ( $1, $2 )" );
conn->prepare( "insert_user", "INSERT INTO tao_chunk_mode ( name, age ) VALUES ( $1, $2 )" );
conn->execute( "insert_user", "Daniel", 42 );
conn->execute( "insert_user", "Tom", 41 );
conn->execute( "insert_user", "Jerry", 29 );
Expand All @@ -44,7 +44,7 @@ namespace
std::size_t count = 0;

const auto tr = conn->transaction();
tr->send( "SELECT name, age FROM tao_single_row_mode" );
tr->send( "SELECT name, age FROM tao_chunk_mode" );
tr->set_chunk_mode( 2 );

while( true ) {
Expand All @@ -63,7 +63,7 @@ namespace
TEST_ASSERT( count == 6 );

count = 0;
tr->send( "SELECT name, age FROM tao_single_row_mode" );
tr->send( "SELECT name, age FROM tao_chunk_mode" );
tr->set_chunk_mode( 4 );

while( true ) {
Expand All @@ -84,7 +84,7 @@ namespace
TEST_THROWS( tr->set_single_row_mode() );
TEST_THROWS( tr->set_chunk_mode( 2 ) );

tr->send( "SELECT name, age FROM tao_single_row_mode" );
tr->send( "SELECT name, age FROM tao_chunk_mode" );
TEST_THROWS( tr->set_chunk_mode( 0 ) );
TEST_THROWS( tr->set_chunk_mode( -1 ) );
tr->set_chunk_mode( 2 );
Expand Down

0 comments on commit eccd5aa

Please sign in to comment.