[Dbix-class] Rows as singletons

2008-06-24 Thread David Cantrell
, but the other still had old data in it. Here's my fix: http://www.cantrell.org.uk/david/private/SingletonRows.pm Comments would be most welcome. Please note that it shouldn't be re-distributed yet, or used in any of your projects, as it's not yet got a proper licence on it. -- David Cantrell

[Dbix-class] DBIx::Class::SingletonRows

2008-06-25 Thread David Cantrell
I got permission from my boss, and DBIx::Class::SingletonRows is now wending its merry way through the PAUSE and out to CPAN mirrors. Unlike the earlier versions, this one is a proper component and is only slightly magical. -- David Cantrell | Hero of the Information Age On the bright side

Re: [Dbix-class] DBIx::Class::SingletonRows

2008-06-30 Thread David Cantrell
for themselves instead of being told what to think :) Just as long as they *do* think I don't care what they think ;-) * On Wed, Jun 25 2008, David Cantrell wrote: Unlike the earlier versions, this one is a proper component and is only slightly magical. I'm a bit unclear on this part: sub

[Dbix-class] Updating many-to-many relationships

2012-02-21 Thread David Cantrell
if there were a nice easy way of doing this. As it is, however, the call to the user_roles() method is not having any effect at all - there's no queries generated whatsoever for it, just the UPDATE to change the status from alive to dead. -- David Cantrell | even more awesome than a panda-fur coat

Re: [Dbix-class] Updating many-to-many relationships

2012-02-21 Thread David Cantrell
be doing as I can't see any documentation for the set_$method apart from that it exists - I ASSumed that the data should look the same as when I'm doing an INSERT! -- David Cantrell | Reality Engineer, Ministry of Information Deck of Cards: $1.29. 101 Solitaire Variations book: $6.59

Re: [Dbix-class] Updating many-to-many relationships

2012-02-22 Thread David Cantrell
exist shrug. -- David Cantrell | semi-evolved ape-thing Immigration: making Britain great since AD43 ___ 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

Re: [Dbix-class] Adding comments to generated queries

2012-05-30 Thread David Cantrell
queries) in a given web request. Still, Is there any existing module that would do something like this this? I'm not sure what it would put in outside of a stack trace. You mean like this? http://search.cpan.org/~dcantrell/DBIx-Class-QueryLog-WithStackTrace-1.0/ -- David Cantrell | Nth greatest

Re: [Dbix-class] Search_rs not returning newly created rows

2012-06-21 Thread David Cantrell
in a template. -- David Cantrell | top google result for topless karaoke murders The test of the goodness of a thing is its fitness for use. If it fails on this first test, no amount of ornamentation or finish will make it any better, it will only make it more expensive and foolish

Re: [Dbix-class] many_to_many data access

2012-07-12 Thread David Cantrell
And not all addresses have a city, not all addresses (even within a single country) have the same number of elements, and some places are in multiple countries. Oh what fun! Stupid real world being hard to model. -- David Cantrell | Nth greatest programmer in the world We found no search results

Re: [Dbix-class] sqlite vs mysql

2012-08-02 Thread David Cantrell
actually pay any attention to fields' attributes, not even their data type. Therefore it *can't* DWYM. -- David Cantrell | top google result for internet beard fetish club Every normal man must be tempted at times to spit on his hands, hoist the black flag, and begin slitting throats. -- H. L

[Dbix-class] test failures in latest DBIx::Class

2012-11-15 Thread David Cantrell
then please ask - although I hope you won't, because extracting them from this 'ere automagic deployment thingy is a pain in the arse :-) -- David Cantrell | semi-evolved ape-thing We found no search results for crotchet. Did you mean crotch

Re: [Dbix-class] test failures in latest DBIx::Class

2012-11-16 Thread David Cantrell
On Fri, Nov 16, 2012 at 05:55:39AM +1100, Peter Rabbitson wrote: On Thu, Nov 15, 2012 at 05:55:35PM +, David Cantrell wrote: I'm getting a test failure in the latest DBIx::Class: ... ARGH!!! Fixed: https://metacpan.org/source/RIBASUSHI/Class-Accessor-Grouped-0.10009/Changes I and my

Re: [Dbix-class] how to empty a Table? when there is no primary key

2013-03-25 Thread David Cantrell
- or at least that it should be something that you have to explicitly turn on in DBIx::Class to support data sources which don't really do relationships. -- David Cantrell | Cake Smuggler Extraordinaire comparative and superlative explained: Huhn worse, worser, worsest, worsted, wasted

Re: [Dbix-class] DBIx::Class::Relationship::CascadeActions::delete(): Not in database

2013-03-27 Thread David Cantrell
to work as :: expected. Eeuuww! I would thunk that in_storage should be rolled back too. -- David Cantrell | Cake Smuggler Extraordinaire Computer Science is about lofty design goals and careful algorithmic optimisation. Sysadminning is about cleaning up the resulting mess

Re: [Dbix-class] how to empty a Table? when there is no primary key

2013-03-27 Thread David Cantrell
On Wed, Mar 27, 2013 at 06:12:49AM +1100, Peter Rabbitson wrote: On Mon, Mar 25, 2013 at 03:57:45PM +, David Cantrell wrote: I've always thought that this is something that should be handled by the database, not by DBIx::Class - or at least that it should be something that you have

Re: [Dbix-class] DBIx::Class::Relationship::CascadeActions::delete(): Not in database

2013-03-27 Thread David Cantrell
On Wed, Mar 27, 2013 at 11:49:53PM +1100, Peter Rabbitson wrote: On Wed, Mar 27, 2013 at 12:30:03PM +, David Cantrell wrote: Eeuuww! I would thunk that in_storage should be rolled back too. How would you implement that? (as in how would the perl logic actually look) in the code

Re: [Dbix-class] Dumping fixtures and loading in test script

2013-11-13 Thread David Cantrell
to turn on/off Devel::Cover. Finally, it can clean up the clone on exit or leave it hanging around for debuggery. * sweeping generalisations never work either -- David Cantrell | Nth greatest programmer in the world Never attribute to malice that which can be explained by stupidity

Re: [Dbix-class] Please test the trial release of DBIx::Class 0.082800-to-be

2014-08-14 Thread David Cantrell
Message is from David Cantrell scoreFROM_DAVID_CANTRELL15.72 # This figure from experimentation ___ 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

Re: [Dbix-class] [ANNOUNCE] A less buggy DBIx::Class final (hopefully) trial - v0.082700_10

2014-09-16 Thread David Cantrell
the 23rd of September. Done, for ..._11, and passed. -- David Cantrell | Reality Engineer, Ministry of Information I'm in retox ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http

Re: [Dbix-class] Dynamic/Flexible DBIC views

2014-11-21 Thread David Cantrell
, I'd love to know too. -- David Cantrell | top google result for topless karaoke murders Compromise: n: lowering my standards so you can meet them ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN

Re: [Dbix-class] Fastest method to check for key existence?

2015-02-12 Thread David Cantrell
the impression that the important information which *which* two exist. -- David Cantrell | Minister for Arbitrary Justice Eye have a spelling chequer / It came with my pea sea It planely marques four my revue / Miss Steaks eye kin knot sea. Eye strike a quay and type a word / And weight for it to say

Re: [Dbix-class] Inserting binary data without corrupting

2015-02-27 Thread David Cantrell
, DBIx::Class 0.082810, DBI 1.622, DBD::mysql 4.022. Same happens in MySQL 5.5 with DBD::mysql $latest as well. -- David Cantrell | London Perl Mongers Deputy Chief Heretic You don't need to spam good porn ___ List: http://lists.scsys.co.uk/cgi-bin/mailman

Re: [Dbix-class] Monkey-patching around a MySQL/UTF8 bug

2015-02-26 Thread David Cantrell
On Thu, Feb 26, 2015 at 11:53:49PM +0900, Hailin Hu wrote: Give a try to connect with the option mysql_enable_utf8 = 1 We're already doing that. -- David Cantrell | Reality Engineer, Ministry of Information Disappointment: n: No results found for priapic dwarf custard wrestling

[Dbix-class] Monkey-patching around a MySQL/UTF8 bug

2015-02-26 Thread David Cantrell
like that. Is there a better way that I haven't been able to find in the DBIx::Class doco? -- David Cantrell | Hero of the Information Age Sobol's Law of Telecom Utilities: Telcos are malicious; cablecos are simply clueless. ___ List: http

Re: [Dbix-class] don't want to hit the db again

2015-04-29 Thread David Cantrell
* FROM cows WHERE meadow_id in (map { $_-id } @meadows) iterate over @cows attaching them to appropriate meadow records That returns exactly the same amount of data as the second version, but in two queries. It's O(1) instead of O(N). There will be circumstances where this is faster. -- David

Re: [Dbix-class] Calling enterprise/corporate users

2017-01-25 Thread David Cantrell
exchange emails with Peter in which I said that we'd be happy to test stuff people are working on against our code base. That offer still stands. Not that we're doing anything terribly complicated. -- David Cantrell ___ List: http://lists.scsys.co.uk/cg

Re: [Dbix-class] 4/5 Why Matt's proposal is a farce

2016-10-12 Thread David Cantrell
because they're using it to do things like bill their customers and route phone calls. -- David Cantrell | Nth greatest programmer in the world You can't spell "slaughter" without "laughter" ___ List: http://lists.scsys.co.u

Re: [Dbix-class] ??? VOTE NOW: DBIC Governance and Namespace Control ???

2016-12-06 Thread David Cantrell
roposed by Matt Trout ... > > * PROPOSAL B: Primary permissions for DBIx::Class and related namespaces > shall be managed solely by Peter Ribasushi ... I vote for PROPOSAL A. -- David Cantrell | Nth greatest programmer in the world All children should be aptitude-tested at an early ag

Re: [Dbix-class] Static / reference data

2018-08-23 Thread David Cantrell
nships that is the default, for others you need to explicitly set the join type. See https://metacpan.org/pod/DBIx::Class::Relationship for gory details. -- David Cantrell David Cantrell System Architect The Hut Group<http://www.thehutgroup.com/> Tel: Email: david.cantr...@uk2group.com<mailto:david.cantr.

[Dbix-class] Are might_have relationships overly fussy?

2018-07-24 Thread David Cantrell
ongs_to with a left join appears to be *exactly the same* as a might_have, just with more typing. I wonder therefore whether 'might_have' is being too fussy here and that warning should be got rid of. -- David Cantrell David Cantrell System Architect The Hut Group<http://www.thehutgroup

Re: [Dbix-class] Are might_have relationships overly fussy?

2018-07-24 Thread David Cantrell
On Tue, Jul 24, 2018 at 12:29:29PM +0200, Marco Vittorini Orgeas wrote: > Have you specified a custom join condition on that relationship which is > not showed on the posted code? This is straight from the docs: No. -- David Cantrell | semi-evolved ape-thing Disappointment: n: No r

[Dbix-class] Joins using sub-selects

2018-10-08 Thread David Cantrell
st plain hideous. Also I'd like to get rid of the repetition where I've said twice that the 'type' field should be 'new' and that the serviceplan_id should match, and the inconsistency where I refer to the foreign table as $foreign is some places but by its true name inside the sub-select. Any clu

Re: [Dbix-class] Joins using sub-selects

2018-10-09 Thread David Cantrell
er way I'll just have to accept, comment the hell out of it, and write some extensive torture-tests to make sure no-one breaks anything when they refactor the "obviously unnecessary" repetition in the future. -- David Cantrell | London Perl Mongers Depu

Re: [Dbix-class] Logging all SQL calls

2019-03-27 Thread David Cantrell
ed to over-ride query_end (to make it write the file and prevent it from remembering stuff) and quary_class() which is just an implementation detail. -- David Cantrell | Hero of the Information Age Irregular English: you have anecdotes; they have dat