Skip to content

Commit 770b289

Browse files
committed
match API for tableElts
1 parent 3576895 commit 770b289

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

packages/ast/deploy/schemas/ast_helpers/procedures/helpers.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ IMMUTABLE;
951951
CREATE FUNCTION ast_helpers.create_table (
952952
v_schema_name text,
953953
v_table_name text,
954-
v_table_cols jsonb default null
954+
v_table_elts jsonb default null
955955
)
956956
RETURNS jsonb
957957
AS $$
@@ -963,7 +963,7 @@ CREATE FUNCTION ast_helpers.create_table (
963963
v_inh := TRUE,
964964
v_relpersistence := 'p'
965965
),
966-
v_tableElts := v_table_cols,
966+
v_tableElts := v_table_elts,
967967
v_oncommit := 'ONCOMMIT_NOOP'
968968
),
969969
v_stmt_len := 1

packages/ast/sql/ast--13.0.3.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3669,7 +3669,7 @@ BEGIN
36693669
END;
36703670
$EOFCODE$ LANGUAGE plpgsql IMMUTABLE;
36713671

3672-
CREATE FUNCTION ast_helpers.create_table ( v_schema_name text, v_table_name text, v_table_cols jsonb DEFAULT NULL ) RETURNS jsonb AS $EOFCODE$
3672+
CREATE FUNCTION ast_helpers.create_table ( v_schema_name text, v_table_name text, v_table_elts jsonb DEFAULT NULL ) RETURNS jsonb AS $EOFCODE$
36733673
select ast.raw_stmt(
36743674
v_stmt := ast.create_stmt(
36753675
v_relation := ast.range_var(
@@ -3678,7 +3678,7 @@ CREATE FUNCTION ast_helpers.create_table ( v_schema_name text, v_table_name text
36783678
v_inh := TRUE,
36793679
v_relpersistence := 'p'
36803680
),
3681-
v_tableElts := v_table_cols,
3681+
v_tableElts := v_table_elts,
36823682
v_oncommit := 'ONCOMMIT_NOOP'
36833683
),
36843684
v_stmt_len := 1

packages/ast/test/__tests__/sandbox/create-table.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ it('with fields', async () => {
2626
ast_helpers.create_table(
2727
v_schema_name := 'my_schema_name',
2828
v_table_name := 'my_table_name',
29-
v_table_cols := to_jsonb(ARRAY[
29+
v_table_elts := to_jsonb(ARRAY[
3030
ast.column_def(
3131
v_colname := 'my_col_id',
3232
v_typeName := ast.type_name(

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ select deparser.deparse(
7676
ast_helpers.create_table(
7777
v_schema_name := 'my_schema_name',
7878
v_table_name := 'my_table_name',
79-
v_table_cols := to_jsonb(ARRAY[
79+
v_table_elts := to_jsonb(ARRAY[
8080
ast.column_def(
8181
v_colname := 'my_col_id',
8282
v_typeName := ast.type_name(

0 commit comments

Comments
 (0)