0, "insert into test (pk, value, d1, f1, c1, t1) values (0,0,0.0,0.0,'abc','a1')" => 0, "select * from test" => 1, "select dolt_add('-A');" => 1, "select dolt_commit('-m', 'my commit')" => 1, "select dolt_checkout('-b', 'mybranch')" => 1, "insert into test (pk, value, d1, f1, c1, t1) values (1,1, 123456.789, 420.42,'example','some text')" => 0, "select dolt_commit('-a', '-m', 'my commit2')" => 1, "select dolt_checkout('main')" => 1, "select dolt_merge('mybranch')" => 1, "select COUNT(*) FROM dolt.log" => 1 ]; foreach ($queries as $query => $expected) { $result = pg_query($conn, $query); if (is_bool($result)) { if (!$result) { echo "LENGTH: {pg_num_rows($result)}\n"; echo "QUERY: {$query}\n"; echo "EXPECTED: {$expected}\n"; echo "RESULT: {$result}"; exit(1); } } else if (pg_num_rows($result) != $expected) { echo "LENGTH: {pg_num_rows($result)}\n"; echo "QUERY: {$query}\n"; echo "EXPECTED: {$expected}\n"; echo "RESULT: {$result}"; exit(1); } } $result = pg_query($conn, "SELECT * FROM test WHERE pk = 1"); assert(1 == pg_num_rows($result)); while($row = pg_fetch_assoc($result)) { assert(1 == $row['pk']); assert(1 == $row['value']); assert(123456.789 == $row['d1']); assert(420.42 == $row['f1']); assert("example " == $row['c1']); assert("some text" == $row['t1']); } pg_close($conn); exit(0) ?>