postgresql8.3
insert into txt (object_id,fti)
values (:object_id,
setweight(to_tsvector(coalesce(:title,'')),'A')
||setweight(to_tsvector(coalesce(:keywords,'')),'B')
||to_tsvector(coalesce(:txt,'')))
postgresql8.3
where fti @@ to_tsquery(:query)
and exists (select 1
from acs_object_party_privilege_map m
where m.object_id = txt.object_id
and m.party_id = :user_id
and m.privilege = 'read')
postgresql8.4
where fti @@ to_tsquery(:query)
postgresql8.3
select txt.object_id
from
[join $from_clauses ","]
$base_query
[expr {[llength $where_clauses] > 0 ? " and " : ""}]
[join $where_clauses " and "]
order by ts_rank(fti,to_tsquery(:query)) desc
$limit_clause $offset_clause
postgresql8.4
select distinct(orig_object_id) from acs_permission__permission_p_recursive_array(array(
select txt.object_id
from
[join $from_clauses ","]
$base_query
[expr {[llength $where_clauses] > 0 ? " and [join $where_clauses { and }]" : ""}]
order by ts_rank(fti,to_tsquery(:query)) desc
), :user_id, 'read')
$limit_clause $offset_clause
postgresql8.3
select count(*)
from
[join $from_clauses ","]
$base_query
[expr {[llength $where_clauses] > 0 ? " and [join $where_clauses { and }]" : ""}]
postgresql8.4
select count(distinct(orig_object_id)) from acs_permission__permission_p_recursive_array(array(
select txt.object_id
from
[join $from_clauses ","]
$base_query
[expr {[llength $where_clauses] > 0 ? " and " : ""}]
[join $where_clauses " and "]
), :user_id, 'read')
postgresql8.3
select ts_headline(:txt,to_tsquery(:query))
postgresql8.3
update txt set fti =
setweight(to_tsvector(coalesce(:title,'')),'A')
||setweight(to_tsvector(coalesce(:keywords,'')),'B')
||to_tsvector(coalesce(:txt,''))
where object_id=:object_id
postgresql8.0
insert into txt (object_id,fti)
values (:object_id,
setweight(to_tsvector('default',coalesce(:title,'')),'A')
||setweight(to_tsvector('default',coalesce(:keywords,'')),'B')
||to_tsvector('default',coalesce(:txt,'')))
postgresql8.0
where fti @@ to_tsquery('default',:query)
and exists (select 1
from acs_object_party_privilege_map m
where m.object_id = txt.object_id
and m.party_id = :user_id
and m.privilege = 'read')
postgresql8.0
select txt.object_id
from
[join $from_clauses ","]
$base_query
[expr {[llength $where_clauses] > 0 ? " and " : ""}]
[join $where_clauses " and "]
order by rank(fti,to_tsquery('default',:query)) desc
$limit_clause $offset_clause
postgresql8.2
select count(*)
from
[join $from_clauses ","]
$base_query
[expr {[llength $where_clauses] > 0 ? " and " : ""}]
[join $where_clauses " and "]
postgresql8.0
select headline('default',:txt,to_tsquery('default',:query))
postgresql8.0
update txt set fti =
setweight(to_tsvector('default',coalesce(:title,'')),'A')
||setweight(to_tsvector('default',coalesce(:keywords,'')),'B')
||to_tsvector('default',coalesce(:txt,''))
where object_id=:object_id