--from DBIx::Class --to MySQL MySchema.pm Schema1.sql
spits out:
Error: translate: Error with parser 'DBIx::Class': Undefined subroutine
DBIx::Class::parse called at
/usr/lib/perl5/vendor_perl/5.8.5/SQL/Translator.pm line 484.
What is the correct way?
--
Bernhard Graf
I'd like to have DBIx::Class::HTMLWidget set my widget element's
maxlength if available from DBIC result_source and appropriate for the
widget element.
I attach my changes here.
This is not very much tested, but works for me.
What do you think?
--
Bernhard Graf
--- /usr/lib/perl5/vendor_perl
in
deflated state, right?
--
Bernhard Graf
___
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
.
--
Bernhard Graf
___
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
.
INST_FILE/usr/lib/perl5/vendor_perl/5.8.5/DBIx/Class.pm
INST_VERSION 0.06003
cpan install DBIx::Class
DBIx::Class is up to date.
--
Bernhard Graf
___
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix
Daniel Westermann-Clark wrote:
On 2006-09-23 22:18:35 +0200, Bernhard Graf wrote:
my $esc =
$c-model('DB::Table')-result_source-schema-storage-dbh-get_in
fo(14); my $input = $c-request-params-{input}
$input =~ s/([_%])/$esc$1/g;
Not very pretty, but always needed, where user input from
) = @_;
$self-roles-find($role);
}
To save db access I'd prefer caching $user-roles-all inside the user
object ($c-user-obj) in the first call of has_role() and access roles
in subsequent calls to has_role() from this cache.
Is this possible?
--
Bernhard Graf
On Friday 06 October 2006 18:42, Bernhard Graf wrote:
I have a user - roles setup similar to
Catalyst::Manual::Tutorial::Authentication.
My application quite often queries roles for the authenticated user
($c-user-obj) within one HTTP query.
For this purpose I defined a method in the DBIC
-inflate },
deflate = sub { shift-deflate },
}) for qw/col1 col2 col3/;
?
Buys us readability and saves us a little typing and few CPU-Cycles ;-)
I would think. At least it doesn't hurt. ;-)
--
Bernhard Graf
___
List: http://lists.rawmode.org
not quite sure which code you mean (my Perl code, my SQL code or
DBIC). I hacked on the latter and now my task can be solved (though it
is still very ugly).
Matt, make me happy and apply the attached patch to DBIC. :-)
--
Bernhard Graf
--- DBIx/Class/Storage/DBI.pm (revision 2947)
+++ DBIx/Class
Since I have a current DBIC working copy on my HD now, I also offer this
patch to be applied. It lets you set an inflator for multiple columns
at once, as described in my email one month ago:
http://lists.scsys.co.uk/pipermail/dbix-class/2006-October/002687.html
--
Bernhard Graf
--- DBIx/Class
Matt S Trout wrote:
Bernhard Graf wrote:
Since I have a current DBIC working copy on my HD now, I also offer
this patch to be applied. It lets you set an inflator for multiple
columns at once, as described in my email one month ago:
http://lists.scsys.co.uk/pipermail/dbix-class/2006
. ;-)
--
Bernhard Graf
___
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive: http
something like
{ 'table1.key' = \'!=table2.key', 'table1.maximum = {'', 23}}
that should result in
table1.key != table2.key AND table1.maximum 23
--
Bernhard Graf
___
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http
Matt S Trout wrote:
Bernhard Graf wrote:
Matt S Trout wrote:
SELECT me.title
FROM email me
LEFT JOIN chunk chunks ON chunks.email=me.id
LEFT JOIN chunk chunks_2 ON chunks_2.email=me.id AND
chunks.id!=chunks_2.id
why not just join = [ qw/chunks chunks/ ] and add { 'chunks.id
isn't either a scalar or a scalar reference.
--
Bernhard Graf
___
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast
A. Pagaltzis wrote:
* Bernhard Graf [EMAIL PROTECTED] [2006-11-28 23:35]:
turned out that this cannot be easily achived, because of
shortcomings in SQL::Abstract, which doesn't support
placeholders in the FROM-part of a query.
Neither does any database, so I don’t see it as a shortcoming
Matt S Trout wrote:
Where are the tests?
Here you are!
--
Bernhard Graf
Index: t/76joins.t
===
--- t/76joins.t (revision 2953)
+++ t/76joins.t (working copy)
@@ -16,7 +16,7 @@
eval use DBD::SQLite;
plan
).
Exactly.
chunks.id!=chunks_2.id servers completely different purposes if it is
either in a LEFT JOIN or else in the WHERE part.
--
Bernhard Graf
___
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix
must be
different to my suggestions without justification - if you don't
explain *why* you think that, I can't tell you the bit you're missing
:)
I'm still not convinced. ;-P
Anyway - is the patch I sent yesterday acceptable now?
--
Bernhard Graf
now?
--
Bernhard Graf
___
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
Searchable Archive
- what is the status of these patches?
--
Bernhard Graf
___
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk
understand. Matt, thanks for answering my request.
--
Bernhard Graf
___
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos
implementing it that caused you to do it differently?
I cannot find your posting where you proposed that originally.
Anyway my implementation potentially saves method calls while your
proposal adds one or more.
--
Bernhard Graf
___
List: http
NetAddr::IP) is the right approach for DBIC
inflators.
HTH
--
Bernhard Graf
___
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org
, to be consistent it
should always return a single value: either a row object or undef.
Objections?
--
Bernhard Graf
___
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix
?
Opinions welcome, I'm not -overly- troubled either way although by
default I'd say the current conceptual consistency is the correct
answer.
At least documentation should clarify the fact, that find() returns a
list of row objects, that either has 1 or 0 elements.
--
Bernhard Graf
Matt S Trout wrote:
On Sun, May 13, 2007 at 10:25:16PM +0200, Bernhard Graf wrote:
So since find() is not designed to return lists, to be consistent
it should always return a single value: either a row object or
undef.
Objections?
I'm now convinced.
Patch and test please, if you
are.
The actual patch is really simple.
Concerning the tests: I hope I got your instructions right... hope it's
OK the way it is.
--
Bernhard Graf
Index: t/61findnot.t
===
--- t/61findnot.t (revision 0)
+++ t/61findnot.t (revision 0)
@@ -0,0
Matt S Trout wrote:
Have fun!
I think this is a good moment to say Thank you for the tremendous work
to Matt and all contributors. DBIx::Class is great.
--
Bernhard Graf
___
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki
30 matches
Mail list logo