Am 16.07.2010 um 10:18 schrieb Benjamin Martin:
Hello everyone,
I have a ResultSet where I have used the 'resultset_attributes' to restrict
which records get returned from search etc. ... ala the documentation:
__PACKAGE__-resultset_attributes({ where = { deleted = undef } });
In
On Tue, 25 May 2010 21:28:45 +0200, BUCHMULLER Norbert norbi.li...@nix.hu
wrote:
Hi Guys,
at the company where I work we are trying to make DBIC and Moose
befriend: ie. making the Result (Row) objects regular Moose objects (as
much as reasonable), so that we can use type constraints,
um 19:45 schrieb Oleg Kostyuk:
Very interesting.
Where it's possible to look at sources?
2010/3/24 Moritz Onken on...@houseofdesign.de:
Hi,
the latest discussion about using Moose and DBIC got me thinking and I
started a little proof of concept project.
It's called MooseX:DBIC
Hi,
the latest discussion about using Moose and DBIC got me thinking and I
started a little proof of concept project.
It's called MooseX:DBIC. It contains a MooseX::DBIC::Schema class which is
a subclass of DBIx::Class::Schema.
The idea is to have a layer which takes Moose classes and generates
I notice that DBIC does a select to find the related rows (i.e. in the
Cd table when looking for rows to cascade delete). Is there a reason
that's done instead of just deleting directly?
INSERT INTO artist ( label, name) VALUES ( ?, ? ): '1', 'test aritst'
INSERT INTO cd ( artist)
Am 26.10.2009 um 17:36 schrieb Chris Cole:
Hi,
I'd like to convert the below code to using a variable number of ORs
on
the 'name' column. i.e. there may be a data3 as well as data1 and
data2.
my $schema = DB::Schema-connect();
my @rows = $schema-resultset('Reads2expt')-search(
#
Am 08.10.2009 um 14:18 schrieb Ido Perlmuter:
-- Forwarded message --
From: Ido Perlmuter i...@ido50.net
Date: Wed, Oct 7, 2009 at 6:40 PM
Subject: Simple query makes SQL::Abstract puke
To: dbix-class@lists.scsys.co.uk
Hi.
For some reason, the following query has been
Am 28.07.2009 um 10:59 schrieb Alexander Hartmaier:
Am Dienstag, den 28.07.2009, 00:29 +0200 schrieb Rob Kinyon:
On Thu, Jul 23, 2009 at 08:28, Alexander
Hartmaieralexander.hartma...@t-systems.at wrote:
The DBMS validates data types, length, undef and foreign keys
anyway, so
maybe using it
More important, what's your current version of
InflateColumn::DateTime? Is it up to date?
___
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/
Am 30.06.2009 um 18:10 schrieb David Ihnen:
Rob Kinyon wrote:
Now, if someone can provide a solid use-case, then I'll be onboard.
But, adding features for the sake of adding features is how you end
up
with a crappy API.
Rob
Lets see if I can argue the use case. I tripped over this
Am 18.06.2009 um 14:18 schrieb Pedro Melo:
Hi,
I'm wrapping DBIx::Class over a legacy database that uses the
iso-8859-1 charset internally. My app expects all perl strings as
utf8.
I'm trying to write an extension to DBIC that decodes the value from
the DB into utf8, and does the
Am 29.05.2009 um 16:50 schrieb Андрей Костенко:
Has I can write in DBIx::Class this query:
SELECT * FROM table1 LEFT JOIN table2 ON table2.table1_id=table2.id
AND table2.user_id=123?
Where user_id is an any random number.
Depends on your schema.
I'd say this is equivalent to:
SELECT
Am 23.05.2009 um 22:14 schrieb Moritz Onken:
Am 23.05.2009 um 19:32 schrieb Guillaume Chambriat:
Hi,
I've a PostgreSQL table:
create table date_fields (
id serial primary key,
message integer references messages(id)
on delete cascade,
value timestamp
Am 14.05.2009 um 14:16 schrieb Emmanuel Quevillon:
Hi,
Sorry if my question looks stupid, but I'd like to retrieve the
value of a count returned by an SQL query.
I tried different things but it always return 1
Here is the way I'd like it to work:
...
acc = $g-name(),
num =
Am 07.05.2009 um 10:16 schrieb Alex Kapranoff:
Good day to all!
(this is either a DBIx::Class, SQL::Abstarct or PgSQL fulltext search
+ Perl question)
Can someone please help +selecting a function with several
parameters?
This is the code we came up with. The problem is, $search_text
Am 04.05.2009 um 17:18 schrieb Morgon Hed:
Hi!
I have a XML-column that I inflate/deflate to an object.
What works is to create a new instance of such an object and pass
that to the column-accessor, then when updating the object is
deflated and stored in the database.
The problem now
Am 09.03.2009 um 23:24 schrieb fREW Schmidt:
Hi all!
We are dealing with some weird issues because our database has silly
column names. Specifically speaking we have a column called
'user'. user is a reserved word in T-SQL (we are using SQL
Server.) Anyway, this is the error we get:
Am 09.03.2009 um 20:06 schrieb fREW Schmidt:
Hi all!
We are dealing with some weird issues because our database has silly
column names. Specifically speaking we have a column called
'user'. user is a reserved word in T-SQL (we are using SQL
Server.) Anyway, this is the error we get:
Am 17.01.2009 um 06:35 schrieb Ashley:
http://www.mail-archive.com/dbix-class@lists.scsys.co.uk/msg02450.html
What am I, chopped Warnock?
:(
Producer::PG and Produver::SQLite have very much in common.
Du you think it make sense to subclass from Postgres and
modify sub producer and friends,
Am 03.10.2008 um 19:37 schrieb Marc Mims:
* Matt S Trout [EMAIL PROTECTED] [081001 18:40]:
I'll happily give you svn space for it and we can figure out how to
deprecate
IC::File in favour of it later.
Just let me know when you're ready for it and get it into svn.
Consider
Am 04.10.2008 um 16:07 schrieb Marc Mims:
* Moritz Onken [EMAIL PROTECTED] [081004 06:10]:
You can SHA each column of the primary key and then SHA the joined
SHAs.
SHA(SHA(A).SHA(B)) != SHA(AB);
Perfect! Thanks.
Hi Marc,
I had a quick glance at your code and have some questions
You can override _fs_column_dir to provide directory tree nesting
however you like. I would still like to make this a config option,
somehow, but this is a start.
Hi Marc,
I think your code covers everything. Well, actually there is one more
thing:
It would be great if one could specify a
Am 29.09.2008 um 17:50 schrieb Matt S Trout:
On Sun, Sep 28, 2008 at 05:56:11PM +0100, Oliver Gorwits wrote:
Ideally, DBIC would instead populate the relationship_info details
after someone has set up __PACKAGE__-many_to_many(...). That would
avoid this guesswork.
Why is there no
Am 25.08.2008 um 20:43 schrieb Matt S Trout:
On Sat, Aug 23, 2008 at 08:53:27AM +0200, Moritz Onken wrote:
Something like:
my $search = { };
my $attr = { prefetch = [ qw/tracks tags/ ] };
my $cd = $schema-resultset(Artist)-first-cds-search($search,
$attr)-first;
$cd-tracks-all;
$cd-tags
Am 22.08.2008 um 23:42 schrieb Peter Rabbitson:
Moritz Onken wrote:
Hi,
I installed the latest svn revision of DBIx-Class-0.08099_04 and my
code
fails serval times because I prefetch multiple has_many rels. This
was
no problem with 0.08010. Why did you change this behaviour? I didn't
Hi,
I installed the latest svn revision of DBIx-Class-0.08099_04 and my
code fails serval times because I prefetch multiple has_many rels.
This was no problem with 0.08010. Why did you change this behaviour? I
didn't read anything about this on thsi list.
I have to change a lot of code for
And now somebody's saved me the trouble of figuring out which bloody
test it was in I'll try and have a go this week :)
Hi,
don't want to bug you but did you have a look at this?
moritz
___
List:
Also, did you look at the existing tests for the one that should
already
cover this like I suggested?
It'd be awful for you to go to the trouble of writing a test when
there's
already a TODO one in the code.
Grepping for TODO did the trick. Found it in 77prefetch.t line 349.
I guess
Hi Moritz,
Nope, you're misunderstanding how it works.
Search with prefetch fetches data and stores it in the resultset
when next/all are called on the resultset.
However find() doesnt use prefetched data at all, there is no
caching for find.
$rs-first, doesnt run any extra queries.
$rs-search({
-and =
[
{\extract(year from age(NOW(),birthday)) = 22},
{sex = male}
]
});
Have you tried the other way around?
-and = [
{ '' = \'extract(year from age(NOW(),birthday))'},
{sex = male}
]
I couldn't understand what is the 22 doing there.
This query fetches all males
Hi,
referring to
http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Manual/Cookbook.pod#Using_SQL_functions_on_the_left_hand_side_of_a_comparison
I tried to run this query:
$rs-search({
-and =
[
{extract(year from age(NOW(),birthday)) = 22},
{sex = male}
]
});
Am 20.07.2008 um 02:53 schrieb Matt S Trout:
On Tue, Jul 08, 2008 at 09:47:50AM +0200, Moritz Onken wrote:
Hi,
sorry for the repost, but there was no answer to my previous post.
And yet you provided no new information to help us diagnose the
problem.
Hint: If you get no answer it usually
Hi,
sorry for the repost, but there was no answer to my previous post.
I have a table 'categories' which has a many_to_many relationship to
itself using a table 'map_categories'.
I found out that prefetching a many_to_many rel does not work. So I
prefetched the has_many rel to
Hi,
I have a table 'categories' which has a many_to_many relationship to
itself using a table 'map_categories'.
I found out that prefetching the many_to_many rel does not work. So I
prefetched the has_many rel to 'map_categories' (parents) and prefetch
the belongs_to rel (parent) from
Am 25.06.2008 um 16:23 schrieb Hartmaier Alexander:
Hi!
many_to_many is no relationship but a relationship helper, so it
can't be prefetched.
You can of course prefetch the two relationships it consists of.
Hi,
thanks. But I found that out already. As I wrote I already prefetch
the
Hi,
I want to add a new method to my Book class. This methods needs to
call a relationship of $author. So how do I get the $author object if
I am calling a function in the Book class. I get the row object by
calling $book = $author-books-first (or similar).
I read the docs but couldn't
Am 25.04.2008 um 17:00 schrieb Matt S Trout:
On Fri, Apr 25, 2008 at 01:56:38PM +0200, Moritz Onken wrote:
Hi,
I want to add a new method to my Book class. This methods needs to
call a relationship of $author. So how do I get the $author object if
I am calling a function in the Book class. I
thanks Brian, thanks Matt,
I think I have to redesign my classes. If I can think of a generic
problem where it could be necessary to retrieve the related object
I'll tell you :)
thanks!
moritz
___
List:
Am 05.04.2008 um 18:00 schrieb Sebastian Willert:
Unfortunately it's not as easy as this. Off the top of my head:
transactional isolation just prevents dirty reads wrt. this problem,
i.E. reading an inconsistent state.
Understood. But the transaction could include a read which checks
Am 21.03.2008 um 17:43 schrieb Matt S Trout:
On Sat, Mar 08, 2008 at 06:11:22PM +0100, Moritz Onken wrote:
Wouldn't it be great (tm) if we could add an on_delete and
on_update config
to all the relationships? Like the cascade_delete config option.
If the DMBS supports that type of actions DBIC
not been done :-)
Am 08.03.2008 um 17:58 schrieb Matt S Trout:
On Tue, Feb 26, 2008 at 01:17:37PM +0100, Moritz Onken wrote:
Hi,
I use the ON DELETE statements in my Pg database to set the foreign
key to null if a column is deleted.
But this information doesn't make it's way to the schema if I use
Interestingly, I thought about the same problem yesterday,
I was looking at the difference of LIKE in postgres and mysql. Seems
like LIKE in postgres is case sensitive and in mysql it's not. So you
have to use ILIKE in postgres to get the same behaviour as LIKE in
mysql.
To make an
Hi again,
Matt wrote some weeks ago a nice mail that we should push postgres a
little bit.
I'd like to write some code which supports postgres even more but I
need some help.
So maybe someone could write something to my earlier post.
moritz
Am 26.02.2008 um 13:17 schrieb Moritz Onken
Look at DBIx::Class::UUIDColumns which overwrites the insert method.
Am 08.02.2008 um 21:52 schrieb Steve Kirkup:
Hello,
Is there a clean way to override the insert() method to call a
sequence generator for getting a primary key?
I would assume it is possible, but I am unsure where it
You should have a look at Crypt::SaltedHash, which is used by Catalyst.
There is also a Plugin called DBIx::Class::SaltedPasswords which I
wrote some month ago. It's pretty simple implementation.
Moritz
--
Moritz Onken
[EMAIL PROTECTED]
Schützenstraße 81
76137 Karlsruhe
Festnetz: +49 (721
Hi,
I create my schemas with the catalyst helper
Catalyst::Helper::Model::DBIC::Schema. It creates all my relations
correct but with pretty ugly names. I'd like to change them but don't
want to remove the relations in the DBMS.
Is there any easy way to achieve that?
Greets,
Moritz
Have a look at
http://search.cpan.org/~jshirley/DBIx-Class-TimeStamp-0.05/lib/DBIx/Class/TimeStamp.pm
Am 20.01.2008 um 13:10 schrieb Fayland Lam:
well, in product server I'm using MySQL and for test cases I'm using
SQLite.
so I wonder to ask whether there is any suggestion for something
I think there is no big difference in speed between the query cache of
a dbms like mysql and a memcache query.
Try disabling the query cache in your dbms to see the performance
impact.
Moritz
Am 10.01.2008 um 10:48 schrieb Ash Berlin:
On Jan 10, 2008, at 3:08 AM, [EMAIL PROTECTED]
48 matches
Mail list logo