Skip to content
Merged
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
22 changes: 22 additions & 0 deletions testing/go/dolt_functions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3045,6 +3045,28 @@ func TestDoltFunctionSmokeTests(t *testing.T) {
},
},
},
{
Name: "dolt_patch works with JSONB columns",
SetUpScript: []string{
"CREATE TABLE repro (pk int primary key, data jsonb);",
"INSERT INTO repro VALUES (1, '{\"text\": \"hello\"}');",
},
Assertions: []ScriptTestAssertion{
{
Query: "SELECT statement_order, table_name, diff_type, statement FROM dolt_patch('HEAD', 'WORKING', 'repro')",
Expected: []sql.Row{
{Numeric("1"), "public.repro", "schema", "CREATE TABLE \"repro\" (\n \"pk\" integer NOT NULL,\n \"data\" jsonb,\n PRIMARY KEY (\"pk\")\n);"},
{Numeric("2"), "public.repro", "data", "INSERT INTO \"repro\" (\"pk\",\"data\") VALUES (1,'{\\\"text\\\": \\\"hello\\\"}');"},
},
},
{
Query: "SELECT diff_type, from_pk, to_pk FROM dolt_diff('HEAD', 'WORKING', 'repro')",
Expected: []sql.Row{
{"added", nil, 1},
},
},
},
},
{
Name: "DOLT_PREVIEW_MERGE_CONFLICTS basic functionality",
SetUpScript: []string{
Expand Down
Loading