Skip to content

fix: sql fn params #366

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

fix: sql fn params #366

wants to merge 4 commits into from

Conversation

psteinroe
Copy link
Collaborator

@psteinroe psteinroe commented Apr 22, 2025

the idea is to replace the fn params with a default value based on their type:

create or replace function users.select_no_ref (user_id int4) returns table (
    first_name text
) language sql security invoker as $$
select
    first_name
FROM 
    users_hidden.users
where 
    id = user_id;
$$;

will become

create or replace function users.select_no_ref (user_id int4) returns table (
    first_name text
) language sql security invoker as $$
select
    first_name
FROM 
    users_hidden.users
where 
    id = 0; -- <-- here
$$;

Todo

  • pass params to typechecker
  • implement apply_identifiers

fixes #353
fixes #352

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant