CREATE or replace FUNCTION chasdb.getAll(_chr_name_intervals text, _min_ovelap real, _min_coverage real, _bio_domain text, _state text, _aed_category text)
RETURNS TABLE(chrom text, mn int, mx int, category text, overlap bigint, coverage bigint, overlap_coverage bigint) AS $$
BEGIN
RETURN QUERY EXECUTE
'SELECT ....
Result<GetallRecord> result2 = createDSLContext().
selectFrom(Routines.getall("", 0.0F, 0.0F, "experiment", "active", "copynumber/gain" )).fetch();
Those code generated by JOOQ
select
"chasdb"."getall"."chrom",
"chasdb"."getall"."mn",
"chasdb"."getall"."mx",
"chasdb"."getall"."category",
"chasdb"."getall"."overlap",
"chasdb"."getall"."coverage",
"chasdb"."getall"."overlap_coverage"
from "chasdb"."getall"(
'',
0.0,
0.0,
'experiment',
'active',
'copynumber/gain')
And I got an exception
ERROR: invalid reference to FROM-clause entry for table "getall"
Hint: There is an entry for table "getall", but it cannot be referenced from this part of the query.
Position: 8
Probably issue with schema name?
How I could get
select *
from "chasdb"."getall"(
'',
0.0,
0.0,
'experiment',
'active',
'copynumber/gain')
?
Thanks in advance