Re: [Dbix-class] VOTE: Removing bootstrap phase

2018-01-15 Thread Hartmaier Alexander
+1 Best regards, Alex (abra...@cpan.org) On 2018-01-13 17:37, Tom Bloor wrote: Voting on PROPOSAL: Removing bootstrap phase[1], seconded by Kaitlyn Parkhurst[2]. As per GOVERNANCE, there are 72 hours to vote on this proposal, from when the proposal was first posted.

Re: [Dbix-class] Result->id

2017-12-18 Thread Hartmaier Alexander
that `DBIx::Class::PK::id` does? It's always difficult to decide what way is better when all ways are "correct". :-) Being grateful for all your comments and suggestions regarding this topic, Vlad On Tue, Nov 28, 2017 at 01:46:17PM +0100, Hartmaier Alexander wrote: Hi, when you defin

Re: [Dbix-class] Result->id

2017-11-28 Thread Hartmaier Alexander
Hi, when you define your 'id' column using add_column it generates an accessor method named 'id' which overwrites the id method of DBIx::Class::PK. Best regards, Alex On 2017-11-28 10:56, Vladimir Melnik wrote: Dear colleagues, Is `id()` should return a content of the `id` column if it

Re: [Dbix-class] SQL::Translator::Producer::Oracle turns timestamp data_type to date

2017-02-03 Thread Hartmaier Alexander
We're only using DATE columns in our schemas as we don't need subsecond precision but you're right, 'TIMESTAMP' and 'TIMESTAMP WITH TIME ZONE' are different datatypes and should be treated as such. Patch for the mapping welcome! Best regards, Alex On 2017-02-01 20:35, Jorge Gonzalez wrote:

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

2016-12-06 Thread Hartmaier Alexander
Proposal A Best regards, Alex On 2016-12-05 07:15, David Golden wrote: Thank you to everyone who has been participating in or just reading the various governance discussions since my initial email to the DBIC list of Oct 3. [1] It's time to bring this to a conclusion. Peter suggests that the

Re: [Dbix-class] PROPOSAL: Governance and sustainability

2016-11-08 Thread Hartmaier Alexander
Are 72 hours enough to reach a significant amount of list members? For releasing a CPAN version that's fine for me as git master should always be in a releaseable state but for feature branch merges I'd like to have this extended to say a week. What do the others think?

Re: [Dbix-class] The email I didn't want to write.

2016-11-07 Thread Hartmaier Alexander
Can everybody please stop bashing ribasushi and work on a solution to get the DBIC development process going again?! Peter is also 'only' a human being and if his interpersonal skills would be higher his technical expertise might not be as good as it is because no one can shine everywhere.

Re: [Dbix-class] GOVERNANCE: Aggregation and conclusion

2016-11-07 Thread Hartmaier Alexander
I find it funny that people are discussing forking. If there are so many that want a fork why hasn't someone already done it? It seems most forget that DBIC is open source software. The license doesn't hinder anyone from forking. The license [1] says on the first two lines: DBIx::Class is

Re: [Dbix-class] IMPORTANT: A discussion of DBIC governance and future development

2016-10-25 Thread Hartmaier Alexander
And you think that when there are not even enough contributors for DBIC itself that will get better when there are two project instead of just one? I doubt that... On 2016-10-24 08:23, Renvoize, Martin wrote: +1 for the DBIC2 namespace and the split being original stable dbic on the primary

Re: [Dbix-class] Fwd: Re: GOVERNANCE: An actually concrete proposal w/bootstrap governance system

2016-10-21 Thread Hartmaier Alexander
On 2016-10-19 05:58, Chris Prather wrote: I suck at email and this got bounced initially. -Chris Begin forwarded message: From: Chris Prather > Date: Oct 18, 2016 at 11:56 PM To: DBIx::Class user and developer list

Re: [Dbix-class] IMPORTANT: A discussion of DBIC governance and future development

2016-10-12 Thread Hartmaier Alexander
On 2016-10-06 21:15, Darren Duncan wrote: On 2016-10-06 8:43 AM, Matt S Trout wrote: On Tue, Oct 04, 2016 at 08:17:49PM -0700, Darren Duncan wrote: That would be good, also in light with how that sentence continues: "I suspect what we need to try and achieve is to get DBIC a bit more

Re: [Dbix-class] IMPORTANT: A discussion of DBIC governance and future development

2016-10-06 Thread Hartmaier Alexander
Sorry for replying that late but I was away for two month and didn't find the right words in the short peroids of time I had. castaway let me quote her answer in the mail conversation between David Golden and the current PAUSE maintainers of DBIC that preceded this one: Having read the last

[Dbix-class] filter many_to_many link table rows on foreign column values

2016-03-19 Thread Hartmaier Alexander
Hi list, as I'm turning around in circles and not finding a solution that satisfies me I'm asking here for help: My schema includes devices, interfaces and lines which can be affected by one or more maintenances. A maintenance has a datetime_start and datetime_end column.

Re: [Dbix-class] is there a way to cache a many_to_many relationship

2015-05-29 Thread Hartmaier Alexander
many-to-many is only a helper method over the two underlying relationships. Did you try to cache those underlying relationships? BR Alex On 2015-05-29 00:56, Kevin Karabian wrote: I know that you can cache other relationships using related_resultset()-set_cache But, since you cannot call

Re: [Dbix-class] create rule

2015-04-27 Thread Hartmaier Alexander
You can use an around method modifier on your schemas deployment_statements method or do it the oldschool way like: sub deployment_statements { my $self = shift; my @ret; my $wa = wantarray; my @additional_after_sql; # add Oracle specific stored functions if (

Re: [Dbix-class] Table name length constraint?

2015-02-24 Thread Hartmaier Alexander
So the correct way to handle that case is to limit only the tablename portion, right? On 2015-02-24 02:00, Greg Coates wrote: That looks to be what is happening. Is there any way to turn this behavior off? This is a legitimate table name with a dblink and schema appended. It works in a

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

2015-02-12 Thread Hartmaier Alexander
I'd additinally restrict the columns returned to the pk columns to save bytes going over the wire and using HRI to not instantiate a result object. Looks like a nice addition to DBIC::Helpers! On 2015-02-12 08:22, QE :: Felix Ostmann wrote: We are using this function in our ResultSet.pm: sub

Re: [Dbix-class] Fixing my relationships to get working queries

2015-01-20 Thread Hartmaier Alexander
On 2015-01-19 18:41, John Stoffel wrote: Peter == Peter Rabbitson rabbit+d...@rabbit.us writes: Peter On 01/13/2015 03:33 AM, John Stoffel wrote: # search in Carey my @r = $schema-resultset('Name')-search( { full_name = { regexp = '[[::]]'.$query.'[[::]]' } }, { order_by = { -asc = 'full_name'

Re: [Dbix-class] nullable column and might_have

2014-06-05 Thread Hartmaier Alexander
Hi Mitchell, you've mistaken the direction of the relationship. The result class with the xxxid column should have a belongs_to relationship to ForeignClass with { join_type = LEFT } so that rows where the xxxid column is NULL won't be missing from the resultset if you're joining the

Re: [Dbix-class] custom resultsource and subclasses

2014-05-28 Thread Hartmaier Alexander
On 2014-05-28 13:51, Mitchell Elutovich wrote: I have the need for a custom resultsource based on the SQL select of a union of multiple tables; I would like to have a different subclass associated with each table and I would have a column which indicated which subclass to choice. In a normal

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Hartmaier Alexander
Hi, On 2014-04-17 12:51, Adam Witney wrote: Hi, I have a Catalyst/DBIx::Class application but I am having trouble with datetime inflation. I have a PostgreSQL database with datestyle SQL, DMY and timezone GB. The table has a field with datatype timestamp without timezone, so my dates

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Hartmaier Alexander
On 2014-04-17 13:41, Adam Witney wrote: On 17. 4. 2014 12:12, Hartmaier Alexander wrote: Hi, On 2014-04-17 12:51, Adam Witney wrote: Hi, I have a Catalyst/DBIx::Class application but I am having trouble with datetime inflation. I have a PostgreSQL database with datestyle SQL, DMY

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Hartmaier Alexander
On 2014-04-17 14:37, Adam Witney wrote: Great thanks, on_connect_do = SET datestyle = 'sql, mdy', did the trick mea culpa! You should use on_connect_call = 'datetime_setup' which does the right thing for every supported RDBMS, so you can use your model e.g. for testing on sqlplus but

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Hartmaier Alexander
On 2014-04-17 15:29, Adam Witney wrote: On 17. 4. 2014 14:20, Hartmaier Alexander wrote: On 2014-04-17 14:37, Adam Witney wrote: Great thanks, on_connect_do = SET datestyle = 'sql, mdy', did the trick mea culpa! You should use on_connect_call = 'datetime_setup' which does the right

Re: [Dbix-class] Where to set database date format for InflateColumn::DateTime?

2014-04-17 Thread Hartmaier Alexander
On 2014-04-17 16:10, Adam Witney wrote: On 17. 4. 2014 14:34, Hartmaier Alexander wrote: On 2014-04-17 15:29, Adam Witney wrote: On 17. 4. 2014 14:20, Hartmaier Alexander wrote: On 2014-04-17 14:37, Adam Witney wrote: Great thanks, on_connect_do = SET datestyle = 'sql, mdy', did

Re: [Dbix-class] join ON *AND*

2014-02-21 Thread Hartmaier Alexander
On 2014-02-21 10:16, Carl Franks wrote: Hi, I can't figure out the DBIx::Class syntax for a JOIN ON x AND y statement. I have a table: query = id title with a has_many() relationship to the table: response_comment id query_id alert posted I want to retrieve

Re: [Dbix-class] Can't get many_to_many links to work

2014-01-30 Thread Hartmaier Alexander
On 2014-01-29 21:38, Ekki Plicht (DF4OR) wrote: Hi, I have a hard time to get a many_to_many 'relation' to work. Three tables: Pages, Images and PageImg (the link or bridge table). A page contains many images, an image can appear on many pages.

Re: [Dbix-class] Re: Reusing defined columns (inheritance?)

2014-01-03 Thread Hartmaier Alexander
On 2014-01-03 14:17, Dmitry Latin wrote: Yeah, but it works only with one parent. I want to subclass from 2 parent classes. Use roles instead of multiple-inheritance, much easier to get right! I would be very grateful to you if you could show me some code to make it work. All my attempts

Re: [Dbix-class] Re: Reusing defined columns (inheritance?)

2014-01-02 Thread Hartmaier Alexander
On 2013-12-30 20:51, Dmitry Latin wrote: That's why frew wrote https://metacpan.org/pod/DBIx::Class::Helper::Row::SubClass. Yeah, but it works only with one parent. I want to subclass from 2 parent classes. Use roles instead of multiple-inheritance, much easier to get right!

Re: [Dbix-class] Re: Reusing defined columns (inheritance?)

2013-12-30 Thread Hartmaier Alexander
On 2013-12-27 12:19, Dmitry Latin wrote: So, I added copying columns into inherited object and it works as I expected. https://github.com/dim0xff/dbic_inheritance/commit/4ff09513a4e70c3e04226c66ed3a2eabe161ad3b Now another question: is it good solution, or it could be better? Are there any

Re: [Dbix-class] Re: Reusing defined columns (inheritance?)

2013-12-30 Thread Hartmaier Alexander
On 2013-12-27 14:47, J. Braun wrote: Am 27.12.2013 12:19, schrieb Dmitry Latin: So, I added copying columns into inherited object and it works as I expected. https://github.com/dim0xff/dbic_inheritance/commit/4ff09513a4e70c3e04226c66ed3a2eabe161ad3b Now another question: is it good solution,

Re: [Dbix-class] extended paging

2009-12-01 Thread Hartmaier Alexander
The data might change between page loads too. Best regards, Alex Am 01.12.2009 um 19:16 schrieb Matija Grabnar mat...@serverflow.com: Rodrigo wrote: Ideally, I think the paging algorithm somewhere should handle a callback filter sub and be able to fetch a few more rows (until a page is

RE: [Dbix-class] Same table set, multiple schema problem

2009-01-07 Thread Hartmaier Alexander
I've also multiple apps/scripts which use the same tables. I've a module named NAC::Model::DBIC which includes the Table and ResultSet classes which are shared between them (e.g. NAC::Model::DBIC::Table::XXX and NAC::Model::DBIC::ResultSet::XXX). The schema files are per catalyst app + one in

AW: [Dbix-class] Base class behavior change from latest release to trunk

2008-11-21 Thread Hartmaier Alexander
Maybe there is a method named 'result_source' which conflicts with your column named result_source? If you can't change the colname in the db try to use a different accessor. -Alex Von: J. Shirley [EMAIL PROTECTED] Gesendet: Dienstag, 18. November 2008 03:49 An:

RE: [Dbix-class] Race condition in find_or_create()

2008-08-01 Thread Hartmaier Alexander
For Oracle that would be the ORA-numbers. Imho lots of the db specific things belong into the DBD modules. -Alex From: Oleg Pronin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 31, 2008 11:40 PM To: DBIx::Class user and developer list Subject: Re: [Dbix-class] Race condition in find_or_create()

RE: [Dbix-class] DBIC hits DB thoguh using prefetch (repost)

2008-07-16 Thread Hartmaier Alexander
Hi Moritz! You have to use the rels the same way to prefetch them, without using the many_to_many helper (which I can't see in your code). Imho the -all is the problem. But why have the MapCategories table at all? Just store the parent or child in your Categories table! Or is it really possible

RE: [Dbix-class] Storing ResultSets in the schema

2008-07-16 Thread Hartmaier Alexander
I'd like to see a feature in dbic for this too. I have some small tables where prefetching them slows down the queries quite a lot. I load them on cat app startup, transform them to hashrefs and cache them for an hour with the caching plugin. Something in dbic which transparently allows calling

RE: REPOST: [Dbix-class] DBIx::Class and caching

2008-07-16 Thread Hartmaier Alexander
This looks promising to me (but I'm sure mst will find an argument against it ;-). If not it would be a great addition to dbic or a nice standalone module! -Alex From: Oleg Pronin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 03, 2008 4:19 PM To: dbix-class@lists.scsys.co.uk Subject: REPOST:

RE: [Dbix-class] Small patch forDBIx::Class::Storage::DBI::Oracle::Generic (BLOB handling)

2008-05-29 Thread Hartmaier Alexander
I'm in for testing on Oracle 10.2.0.3.0 on Sun Solaris from a debian 4.0 box. -Alex -Original Message- From: Matt S Trout [mailto:[EMAIL PROTECTED] Sent: Thursday, May 29, 2008 8:08 AM To: DBIx::Class user and developer list Subject: Re: [Dbix-class] Small patch

RE: [Dbix-class] select from dual

2008-05-13 Thread Hartmaier Alexander
It's DBIC, not DBIx, which is a namespace! You might fetch $dbh and do it with a DBI method or create a dual table class. I think this was discussed on the list a few month ago...yes, the thread was started by Richard Cox on the 9.11.2007. He even submitted a doc patch which Jess applied on the

RE: [Dbix-class] bugs? distinct SQL

2008-05-09 Thread Hartmaier Alexander
You might want to use a distinct = 1 which results into a group by sql. -Alex -Original Message- From: Matt S Trout [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 06, 2008 8:47 PM To: DBIx::Class user and developer list Subject: Re: [Dbix-class] bugs? distinct SQL On Tue, May 06, 2008 at

RE: [Dbix-class] oracle sysdate?

2008-05-09 Thread Hartmaier Alexander
I strongly suggest to declare your datetime columns as such and use DateTime-now() to get the actual datetime and use that object for your dbic calls! This way you are dbms independent. -Alex -Original Message- From: Charles Alderman [mailto:[EMAIL PROTECTED] Sent: Friday, May 02,

RE: [Dbix-class] Incorrect SQL for many_to_many?

2008-04-08 Thread Hartmaier Alexander
Please post your search which leads to the problem and the relationships specified in your table classes as well please. But I think you missed the point that many_to_many is a helper and no real relationship which can be used for searches. -Alex -Original Message- From: Alex

RE: [Dbix-class] Re: Re: A better Digest / Encoding / EncryptionComponent

2008-01-30 Thread Hartmaier Alexander
I don't get the difference to deflating (no inflating possible for hashed passwords ;-). -Alex -Original Message- From: Matt S Trout [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 30, 2008 6:01 PM To: DBIx::Class user and developer list Subject: Re: [Dbix-class] Re: Re: A better

RE: [Dbix-class] DBIx::Class query with UNION and RIGHT JOIN

2008-01-30 Thread Hartmaier Alexander
Thats nasty!!! You should have told me this a year ago! -Alex -Original Message- From: Jess Robinson [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 30, 2008 1:53 PM To: DBIx::Class user and developer list Subject: Re: [Dbix-class] DBIx::Class query with UNION and RIGHT JOIN On

RE: [Dbix-class] upper case search

2008-01-30 Thread Hartmaier Alexander
I think she wants case insensitive search. I do this by calling search_literal at the moment: # predefined resultset for my device listing template my $rs_devices = $schema-resultset('Device')-search(undef, { prefetch= [ [ 'rel_monitor', 'rel_location', 'rel_device_type'

RE: [Dbix-class] Resultset with memcached

2008-01-08 Thread Hartmaier Alexander
Hi! Where does $agent come from? I only see $date (which should me declared with my $date btw). Just for information, a resultset doesn’t contain any data, the sql is only generated and executed if you access the rs by array or iterator (or -first like in your case). So because the rs

RE: [Dbix-class] all data at once

2007-12-12 Thread Hartmaier Alexander
'] }); $rs-populate([{female={%females},%family,male={%males},}]); Hartmaier Alexander wrote: Hi! Why isn‘t the gender a simple attribute but instead two different tables

RE: [Dbix-class] Why is prefetch so slow?

2007-10-12 Thread Hartmaier Alexander
I know, been there, but not with sql! ;-) -Alex -Original Message- From: Ash Berlin [mailto:[EMAIL PROTECTED] Sent: Friday, October 12, 2007 2:08 PM To: Class user and developer list Subject: Re: [Dbix-class] Why is prefetch so slow? Hartmaier Alexander wrote: Zero time sql! Sounds

RE: [Dbix-class] Why is prefetch so slow?

2007-10-12 Thread Hartmaier Alexander
Zero time sql! Sounds like a Whoracle feature for version 12! Or the next big thing for Damian Conway after his this year's YAPC::EU talk... -Alex -Original Message- From: Jon Schutz [mailto:[EMAIL PROTECTED] Sent: Friday, October 12, 2007 10:49 AM To: DBIx::Class user and developer

RE: [Dbix-class] oracle sequence auto-pk patch

2007-10-04 Thread Hartmaier Alexander
Hi! That is possible now too, you only have to specify the sequence name in your table class: __PACKAGE__-add_columns( id_table = { sequence= __PACKAGE__-schemaname . '.seq_for_this_table', is_auto_increment = 1, }, ); Works for me flawless since dbic

RE: [Dbix-class] Startup speed

2007-08-17 Thread Hartmaier Alexander
Faster hardware? ;-) My largest DBIC schema of my model has currently 69 of 74 tables (wow, didn't know I have that much...): time perl -MNAC::Model::DBIC::Schema::NAC -e 1 real0m0.997s user0m0.960s sys 0m0.036s That’s DBIC 0.08006 on an Athlon 2000+ (1666MHz). -Alex