Re: [CDBI] Connection with a fixed "where" clause.
[prev]
[thread]
[next]
[Date index for 2005/08/22]
On Mon, Aug 22, 2005 at 09:36:51AM +0200, Karl.Moens@xxxxx.xxx wrote:
> Hi ListMembers,
>
> Is it possible to have a class with a fixed "where" clause?
It'd be a bit of a pain to do, but it's definitely possible. Class::DBI
defines all its SQL statements as Ima::DBI set_sqls, so all (!) you'd have to
do is redefine those - e.g.
__PACKAGE__->set_sql(SearchSQL => <<'');
SELECT %s
FROM %s
WHERE %s
would become
__PACKAGE__->set_sql(SearchSQL => <<'');
SELECT %s
FROM %s
WHERE restricted_access = 0 AND %s
--
Matt S Trout Website: http://www.shadowcatsystems.co.uk
Technical Director E-mail: mst (at) shadowcatsystems.co.uk
Shadowcat Systems Ltd.
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
_______________________________________________
ClassDBI mailing list
ClassDBI@xxxxx.xxxxxxxxxxxxxxxx.xxx
http://lists.digitalcraftsmen.net/mailman/listinfo/classdbi
|
|
Re: [CDBI] Connection with a fixed "where" clause.
Matt S Trout 20:50 on 22 Aug 2005
|