Skip to content

Commit

Permalink
Clarify function names
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenceisla committed Dec 28, 2023
1 parent 8f5e877 commit 7d70fb6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sql/components.sql
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ $$;
create or replace function oas_build_component_schemas(schemas text[])
returns jsonb language sql as
$$
select oas_build_component_schemas_tables(schemas) ||
oas_build_component_schemas_composite_types(schemas)
select oas_build_component_schemas_from_tables(schemas) ||
oas_build_component_schemas_from_composite_types(schemas)
$$;

create or replace function oas_build_component_schemas_tables(schemas text[])
create or replace function oas_build_component_schemas_from_tables(schemas text[])
returns jsonb language sql as
$$
select jsonb_object_agg(x.table_name, x.oas_schema)
Expand All @@ -36,7 +36,7 @@ from (
) x;
$$;

create or replace function oas_build_component_schemas_composite_types(schemas text[])
create or replace function oas_build_component_schemas_from_composite_types(schemas text[])
returns jsonb language sql as
$$
SELECT coalesce(jsonb_object_agg(x.ct_name, x.oas_schema), '{}')
Expand Down

0 comments on commit 7d70fb6

Please sign in to comment.