Hey community, I am trying out the typed query feature and run into a problem that might also be faulty usage by me. I got the following raw query file:
-- @param {String} $1:text-- @param {Int} $2:limitDO $$BEGIN IF NOT EXISTS ( SELECT 1 FROM pg_extension WHERE extname = 'fuzzystrmatch' ) THEN CREATE EXTENSION fuzzystrmatch SCHEMA matching; END IF;SELECT*, levenshtein(name, $1) AS distanceFROM "matching"."skills"ORDER BY distance ASCLIMIT $2;END$$;
-- @param {String} $1:text-- @param {Int} $2:limitDO $$BEGIN IF NOT EXISTS ( SELECT 1 FROM pg_extension WHERE extname = 'fuzzystrmatch' ) THEN CREATE EXTENSION fuzzystrmatch SCHEMA matching; END IF;SELECT*, levenshtein(name, $1) AS distanceFROM "matching"."skills"ORDER BY distance ASCLIMIT $2;END$$;
As you can see I defined the parameter manually. I did generate the client and try to call it like this: