From: Matt S Trout [EMAIL PROTECTED]
$obj-get_column($col); # COLUMN VALUE
$obj-$col; # ATTRIBUTE VALUE
If I could time travel, I'd make it _get_column so this fact was obvious.
But too much code now relies on it, sadly.
I suspect when we create a new, cleaner row object interface, perhaps
From: David Schmidt [EMAIL PROTECTED]
Hello List,
I used to have an id INTEGER PRIMARY KEY column in every table.
Now I am using DBIC and repeatedly run into this kind of error.
SELECT me.id, me.title, me.artist FROM cds me WHERE ( me.artist = ? ): '2'
SELECT me.id, me.title, me.artist,
From: Noel Burton-Krahn [EMAIL PROTECTED]
This is a reasonable query: load a person with address by the
person's id. The 'id' column is unambiguous in the search call.
However, DBIx generates ambiguous SQL:
DBIx::Class::ResultSet::count(): DBI Exception: DBD::mysql::st execute
failed: Column
From: Peter Rabbitson [EMAIL PROTECTED]
I think that if the query needs to search in a table named me which is
not the primary table, it probably gives another name instead of me
for the main table, so that name shouldn't need to be hard coded in the
programs.
By the way, does anyone know what
From: Ronald J Kimball rkimball+dbixcl...@pangeamedia.com
Thomas L. Shinnick wrote:
I'm having some of the same questions regarding +select and +as . It
seems that using '+select' and '+as' does not stop other columns from
being returned. I'm using DBIC 0.08115.
What do you expect +select
From: iain iainhubb...@googlemail.com
my $uuu = $schema-resultset('User')-search({},{
prefetch = {blogs = 'blog_comments'},
select = ['me.id'],
as = ['user_id'],
});
print $uuu-first-username;
I think the single column that should be printed should be me.id, but
here is the generated SQL:
From: Carl Johnstone dbixcl...@fadetoblack.me.uk
Octavian Rasnita wrote:
my $uuu = $schema-resultset('User')-search({},{
prefetch = {blogs = 'blog_comments'},
select = ['me.id'],
as = ['user_id'],
});
print $uuu-first-username;
I know, but I would like to prefetch only just a few columns from
From: Rob Kinyon rob.kin...@gmail.com
On Sat, Jan 23, 2010 at 16:28, Kiffin Gish kiffin.g...@planet.nl wrote:
I want to delete all rows with a given state which have not been
modified for a given time in seconds.
my @rows = rs-search({ state = $state }, { last_modified = ??? });
$_-delete for
From: Robert Sedlacek r...@474.at
Hey Nick,
Nick Wellnhofer wrote:
It's simply an optimization. I have a table with a text column that can
contain tens of KB of data per row. I also have some queries that don't
need that column, so I'd like to avoid unnecessarily fetching all that
content
From: fREW Schmidt fri...@gmail.com
On Thu, Feb 18, 2010 at 7:02 AM, BUCHMULLER Norbert
norbi.li...@nix.huwrote:
On Wed, 17 Feb 2010 09:19:44 -0600 fREW Schmidt wrote:
1. Only have the remove-columns affect the default select, since
having it affect an explicit columns list is a little
Hi Jesse,
Check:
http://blog.hno3.org/2010/04/22/fixing-double-encoded-utf-8-data-in-mysql/
or search for
mysql double encoding
with Google and you'll find more step by step instructions.
I also had that problem and I dumped a few tables with mysqldump (because not
all the tables were
Octavian
___
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
Octavian
___
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
From: Jim Green student.northwest...@gmail.com
Hello,
when I was reading about moose and orm I found dbic will be based on
moose in next major release. I am currently using RDBO and was
satisfied with it with some exceptions(no sybase support right now, no
potential move to moose)..
RDBO has
I have succeeded to build a Windows executable using:
perlapp --add=Moose --add=MooseX::NonMoose
--add=MooseX::NonMoose::Meta::Role::Class
--add=MooseX::NonMoose::Meta::Role::Constructor --add=namespace::autoclean
--add=DBIx::Class::Schema test.pl
And the program test.pl is a simple program
From: Peter Rabbitson rabbit+d...@rabbit.us
Octavian Rasnita wrote:
And it works, although with a low performance because DBIx::Class has a big
startup lag.
This is not really correct. The slow startup comes from FS operations
while load_namespaces scans for result classes
From: Robert Kinyon rob.kin...@gmail.com
At $work, we build RPMs of the stuff we depend on. Then, we build RPMs of
our stuff with dependencies on the RPMs we built of CPAN modules.
Then, we have our own internal RPM repository that we deploy to prod
from.
That way, we control our upgrades,
From: Bill Moseley
I have two databases that are very similar. For example, the person table
in one db has an email column and the other does not have that column,
otherwise the tables are the same.
My application uses the schema with the table that has the email column, so
there's
Hi all,
I have an Oracle table with 2 clob columns and I am trying to add a new record
in it, using:
my $row = $schema-resultset( 'TblName' )-create( {
question = 'This is the first question',
answer = 'Answer 1',
date_time_q = '2012-01-01 00:00:00',
date_time_a = '2012-01-01
From: Peter Rabbitson rabbit+d...@rabbit.us
Octavian Rasnita wrote:
Hi all,
I have an Oracle table with 2 clob columns and I am trying to add a new
record in it, using:
my $row = $schema-resultset( 'TblName' )-create( {
question = 'This is the first question',
answer = 'Answer
Hi,
I have tried to use:
$self-update_or_create({
symbol = $symbol,
market = $market,
last_update = \'now()',
});
Am I doing something wrong?
The problem is the row:
last_update = \'now()',
...because the generated SQL for select looks like:
SELECT ... FROM table_name me WHERE ( ( ...
From: Websuche :: Felix Ostmann
Subject: Re: [Dbix-class] Using a scalar ref with update_or_create
We run into the same problem and simple split the problem. Make a find, then
update or create (simple look what update_or_create do internally)
Oh, so the answer to my question seems to
Hi,
Using Catalyst helper I tried to update the DBIC schema that was created with
the Catalyst helper, but on another computer, and it gave the following error:
DBIx::Class::Schema::Loader::make_schema_at(): It is not possible to
downgrade a schema that was loaded with use_moose = 1 to
Hi,
I've seen examples of searching in a database using the LIKE operator like:
$rs = $rs-search( {
name = { -like = %$name% },
} );
It doesn't look to be very secure to quote the variable $name this way.
Or maybe the special chars in the whole composed string %$name% are then
escaped if
From: will trillich
Octavian -- Inlining the values, as you say, would be fraught with peril --
DBI (and DBIx::Class) know better, so it's not a problem. It's not special to
the -like operator, it's part of how DBIC works.
[cut]
So if someone put nefarious strings in one of the ID
From: Bill Moseley
On Mon, Oct 8, 2012 at 12:49 AM, Octavian Rasnita orasn...@gmail.com wrote:
It doesn't look to be very secure to quote the variable $name this way.
It's still a bind parameter. But, what I do is remove any existing special
characters and make sure $name has
Hi,
In MySQL is possible to do something like:
select * from table_name order by field(department, 'Marketing', 'Sales',
'Financial', 'IT', 'Operations');
In other databases it should be done differently
Is it possible to do this search with DBIC?
--Octavian
From: Peter Rabbitson rabbit+d...@rabbit.us
On Mon, Dec 17, 2012 at 11:04:22AM +0100, QE :: Felix Ostmann wrote:
I am doing such a order with the following SQL:
...
ORDER BY
(department = 'Marketing') DESC,
(department = 'Sales') DESC,
(department = 'Financial') DESC,
From: Peter Rabbitson rabbit+d...@rabbit.us
On Tue, Dec 18, 2012 at 10:53:25AM +0200, Octavian Rasnita wrote:
From: Peter Rabbitson rabbit+d...@rabbit.us
On Mon, Dec 17, 2012 at 11:04:22AM +0100, QE :: Felix Ostmann wrote:
I am doing such a order with the following SQL:
...
ORDER
From: Peter Rabbitson rabbit+d...@rabbit.us
On Tue, Dec 18, 2012 at 10:53:25AM +0200, Octavian Rasnita wrote:
From: Peter Rabbitson rabbit+d...@rabbit.us
On Mon, Dec 17, 2012 at 11:04:22AM +0100, QE :: Felix Ostmann wrote:
I am doing such a order with the following SQL:
...
ORDER
From: Peter Rabbitson rabbit+d...@rabbit.us
what is so scary/undesirable about modifying the schema ?
That is a real question - you are not the first to word things thusly. I
need to figure out where the fear to add an extra definition is coming
from.
Cheers
I can tell you my source
Hi,
Does anyone know if there is somewhere a features comparison among the most
used ORMS?
I tried to find one that includes Hybernate, ActiveRecord, SQLAlchemy, DBIC,
but I couldn't find such a thing.
I found a lot of comparisons for Java and DotNet ORMS and usually speed
benchmarks.
Hi Rob,
From: Rob Kinyon rob.kin...@gmail.com
What sort of features are you looking for? All the Perl ORMs wrap DBI,
so connecting to different databases isn't a problem. Among the Perl
ORMs, only DBIx::Class has resultsets, arguably the most powerful ORM
concept. (It's not just among Perl
Hello,
I tried to use the following select query, but it gives an error:
use TB::Schema;
$ENV{DBIC_TRACE}++;
my $schema = TB::Schema-connect( dbi:mysql:intranet, root );
my $rs = $schema-resultset('Performance')-search( {}, {
select = [ { date = 'date_time' } ],
as = [ 'date' ],
34 matches
Mail list logo