create or replace function "CreateScrapedUpload" (
_filename text,
_record_count int,
) returns table (
id uuid,
filename text,
storage_key text
record_count int,
notes text,
checkbox boolean
) as $$
insert into rr_upload (
filename,
storage_key,
record_count,
notes,
checkbox,
)
select
filename,
extensions.uuid_generate_v4()
_record_count
_filename,
"",
false
from public.rr_upload rr
returning id, filename, storage_key;
$$ language sql volatile;
create or replace function "CreateScrapedUpload" (
_filename text,
_record_count int,
) returns table (
id uuid,
filename text,
storage_key text
record_count int,
notes text,
checkbox boolean
) as $$
insert into rr_upload (
filename,
storage_key,
record_count,
notes,
checkbox,
)
select
filename,
extensions.uuid_generate_v4()
_record_count
_filename,
"",
false
from public.rr_upload rr
returning id, filename, storage_key;
$$ language sql volatile;