141
141
use base qw(Bio::DB::GFF::Adaptor::dbi::pg);
143
143
use constant FULLTEXTSEARCH => <<END;
144
SELECT distinct gclass,gname,fattribute_value
145
FROM fgroup,fattribute_to_feature,fdata
144
SELECT distinct gclass,gname,fattribute_value,fmethod,fsource
145
FROM fgroup,fattribute_to_feature,fdata,ftype
146
146
WHERE fgroup.gid=fdata.gid
147
147
AND fdata.fid=fattribute_to_feature.fid
148
AND fdata.ftypeid=ftype.ftypeid
148
149
AND (fattribute_to_feature.idxfti @@ to_tsquery('default', ?))
152
153
use constant FULLTEXTWILDCARD => <<END;
153
SELECT distinct gclass,gname,fattribute_value
154
FROM fgroup,fattribute_to_feature,fdata
154
SELECT distinct gclass,gname,fattribute_value,fmethod,fsource
155
FROM fgroup,fattribute_to_feature,fdata,ftype
155
156
WHERE fgroup.gid=fdata.gid
156
157
AND fdata.fid=fattribute_to_feature.fid
158
AND fdata.ftypeid=ftype.ftypeid
157
159
AND lower(fattribute_to_feature.fattribute_value) LIKE lower(?)
215
while (my ($class,$name,$note) = $sth->fetchrow_array) {
217
while (my ($class,$name,$note,$method,$source) = $sth->fetchrow_array) {
217
219
next unless $class && $name; # sorry, ignore NULL objects
218
220
my $featname = Bio::DB::GFF::Featname->new($class=>$name);
220
push @results,[$featname,$note,0]; #gbrowse expects a score, but
221
#pg doesn't give one, thus the 0
221
my $type = Bio::DB::GFF::Typename->new($method,$source);
222
push @results,[$featname,$note,0,$type]; #gbrowse expects a score, but
223
#pg doesn't give one, thus the 0