13 810
правок
Изменения
Funq
,→Объектное формирование запросов
<source lang="perl">
$dbh->join( $dbh->query(tag2entity_cl => "t1")->where("t1.pid=? and t1.tag=?"), ->join($dbh->query(entity => "t0")->where("t0.id=t1.eid and t0.config=? and t0.?t0where"))->select("t0.*")
->order("t0.?t0order")
->limit("?offset", "?limit")
->query(entity => "t0")
->where("t0.?t0where and ?subq in ?tagcount")
->select("t0.*, ?subq as t0.tag_count", )->curry(subq => $dbh ->query(tag2entity => "t1") ->where("t1.pid=t0.pid and t1.eid=t0.eid") ->count->value
)
</source>
->where("t0.?t0where and ?subq in ?tagcount")
->select("t0.*, ?subq as t0.tag_count", subq => $dbh
)
</source>