Skip to content

Commit aaa25c2

Browse files
committed
test: update snapshots for GET DIAGNOSTICS ROW_COUNT fix
4 snapshots updated: all show the corrected output where GET DIAGNOSTICS now includes ROW_COUNT instead of an empty string.
1 parent 9656922 commit aaa25c2

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

packages/plpgsql-deparser/__tests__/__snapshots__/hydrate-demo.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ BEGIN
151151
top_sku_qty = excluded.top_sku_qty,
152152
note = COALESCE(excluded.note, app_public.order_rollup.note),
153153
updated_at = now();
154-
GET DIAGNOSTICS v_rowcount = ;
154+
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
155155
v_orders_upserted := v_rowcount;
156156
v_sql := format('SELECT count(*)::int FROM %I.%I WHERE org_id = $1 AND created_at >= $2 AND created_at < $3', 'app_public', 'app_order');
157157
EXECUTE v_sql INTO v_rowcount USING p_org_id, p_from_ts, p_to_ts;

packages/plpgsql-deparser/__tests__/__snapshots__/schema-rename-mapped.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ CREATE FUNCTION myapp_v2.cleanup_old_sessions(
236236
deleted_count int;
237237
BEGIN
238238
DELETE FROM myapp_v2.sessions WHERE created_at < (now() - CAST(p_days || ' days' AS interval));
239-
GET DIAGNOSTICS deleted_count = ;
239+
GET DIAGNOSTICS deleted_count = ROW_COUNT;
240240
RETURN deleted_count;
241241
END$$;
242242

packages/plpgsql-deparser/__tests__/pretty/__snapshots__/plpgsql-pretty.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ begin
133133
top_sku_qty = EXCLUDED.top_sku_qty,
134134
note = COALESCE(EXCLUDED.note, app_public.order_rollup.note),
135135
updated_at = now();
136-
get diagnostics v_rowcount = ;
136+
get diagnostics v_rowcount = row_count;
137137
v_orders_upserted := v_rowcount;
138138
v_sql := format(
139139
'SELECT count(*)::int FROM %I.%I WHERE org_id = $1 AND created_at >= $2 AND created_at < $3',
@@ -362,7 +362,7 @@ BEGIN
362362
top_sku_qty = EXCLUDED.top_sku_qty,
363363
note = COALESCE(EXCLUDED.note, app_public.order_rollup.note),
364364
updated_at = now();
365-
GET DIAGNOSTICS v_rowcount = ;
365+
GET DIAGNOSTICS v_rowcount = ROW_COUNT;
366366
v_orders_upserted := v_rowcount;
367367
v_sql := format(
368368
'SELECT count(*)::int FROM %I.%I WHERE org_id = $1 AND created_at >= $2 AND created_at < $3',

0 commit comments

Comments
 (0)