Re: [Dbix-class] Is columns to cols as +columns is to +cols
- Original Message - From: Peter Rabbitson rabbit+d...@rabbit.us To: Darius Jokilehto dariusjokile...@yahoo.co.uk; DBIx::Class user and developer list dbix-class@lists.scsys.co.uk Cc: Sent: Monday, 18 March 2013, 18:13 Subject: Re: [Dbix-class] Is columns to cols as +columns is to +cols On Mon, Mar 18, 2013 at 05:54:53PM +, Darius Jokilehto wrote: Hello, [...] Yes it is deprecated, but done incorrectly (I am likely to blame). Could you please add a carp_unique deprecation notice around here somewhere [1]. Btw include_columns is eprecated too, and also unmarked [2] :( git format-patch or github pull requests most welcome [3]. Made a pull request on the github repo - added deprecation warnings and amended the docs for cols and include_columns. Cheers, Darius ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk
[Dbix-class] how to build this query? col1 not like %xx% AND col1 like %yy%
Hello, I tried quite a few things, but it is not working... col1 not like %xx% AND col1 like %yy% OR, if someone can tell me how can i run a select query again on an rs obtained by running a select query on table. ty. ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk
RE: [Dbix-class] how to build this query? col1 not like %xx% AND col1 like %yy%
Hi Rajeev, Not sure what you have tried, but this should work: my $rs_1 = $rs-search({ col1 = { -not_like = %xx%, -like = %yy% } }); Then to do extra searches on the result set, just call search again. my $rs_2 = $rs_1-search({ col1 = { -not_like = '%zz% }}); Documentation for chaining resultsets: https://metacpan.org/module/DBIx::Class::ResultSet#Chaining-resultsets And on where clauses, look at the SQL::Abstract documentation: The main logic of this module is that things in arrays are OR'ed, and things in hashes are AND'ed. https://metacpan.org/module/SQL::Abstract#WHERE-CLAUSES - Paul DISCLAIMER This email contains information that is confidential and which may be legally privileged. If you have received this email in error, please notify the sender immediately and delete the email. This email is intended solely for the use of the intended recipient and you may not use or disclose this email in any way. ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk