Hi,
I have most of the Sybase basic stuff (driver load, etc.) working for
Rose::DB, but it's pretty hacky. I'd like to make it a proper
environment, with Loader support and so on. What do I need to
implement and where? I tried to follow the PostgreSQL example and got
to listing tables, but didn
On Wed, 23 Jan 2008 16:20:48 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
JS> On Jan 23, 2008 2:07 PM, Ted Zlatanov <[EMAIL PROTECTED]> wrote:
>> I found one of the problems is that you forcibly set RaiseError to 1 in
>> a lot of places, in Rose::DB an
On Wed, 23 Jan 2008 13:01:21 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
JS> Yeah, [Class::C3] simplifies this situation greatly (at the cost of
JS> another dependency and possibly a new set of bugs/issues :)
I really think you should put that in the RDBO::Cached docs, with
caveats and all,
On Tue, 22 Jan 2008 20:09:55 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
JS> On Jan 22, 2008 11:42 AM, Ted Zlatanov <[EMAIL PROTECTED]> wrote:
>> I'd like to try without autocommit; I tried the built-in RDBO
>> transactions but those didn't wo
On Tue, 22 Jan 2008 17:17:18 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
JS> Anyway, when building a single super-base class, I don't think it's
JS> particularly ugly to set up your class hierarchy and then yank in a
JS> particular method (say, init_db()) from another specific class. Or
JS>
On Mon, 07 Jan 2008 12:34:16 -0600 Ted Zlatanov <[EMAIL PROTECTED]> wrote:
TZ> On Sat, 5 Jan 2008 15:27:34 -0500 "John Siracusa" <[EMAIL PROTECTED]>
wrote:
JS> On Jan 5, 2008 1:25 PM, Ted Zlatanov <[EMAIL PROTECTED]> wrote:
>>> I realize much of
On Mon, 21 Jan 2008 13:24:49 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
JS> On Jan 21, 2008 8:34 AM, Ted Zlatanov <[EMAIL PROTECTED]> wrote:
>> I have some existing RDBO classes, all inheriting from a common
>> BaseObject parent. If I want
I have some existing RDBO classes, all inheriting from a common
BaseObject parent. If I want some of them to be selectively cached,
currently I have to create a BaseObject::Cached that inherits from
RDBO::Cached (I do this with a copy+edit, see below), and then each of
my classes can inherit from
On Fri, 11 Jan 2008 13:29:43 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
JS> On Jan 11, 2008 1:10 PM, Ted Zlatanov <[EMAIL PROTECTED]> wrote:
>> I think the automatic class builder should have a required option to set
>> the default explicitly (it did
On Fri, 11 Jan 2008 07:43:23 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
JS> That's why I think the default unshared behavior is the "safest" in
JS> that sharing now requires some action (and therefore some thought) on
JS> the part of the developer. The required action is simple (usually a
J
On Sat, 5 Jan 2008 15:27:34 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
JS> On Jan 5, 2008 1:25 PM, Ted Zlatanov <[EMAIL PROTECTED]> wrote:
>> I realize much of this question belongs to database-specific domains,
>> but here goes: I want RDBO inser
On Sat, 05 Jan 2008 14:07:05 -0500 Adam Prime <[EMAIL PROTECTED]> wrote:
AP> Ted Zlatanov wrote:
>> I realize much of this question belongs to database-specific domains,
>> but here goes: I want RDBO insert operations to be faster. I need to
>> load thousands o
I realize much of this question belongs to database-specific domains,
but here goes: I want RDBO insert operations to be faster. I need to
load thousands of records per second into a database. I'm using
PostgreSQL, and everything works correctly. The extra DB operations per
insert are killing pe
On Fri, 21 Dec 2007 20:39:18 -0500 Adam Prime <[EMAIL PROTECTED]> wrote:
AP> I'm not sure if this will help, but i had a similar sort of problem with
AP> a table called 'Category'. this is my loader (which works). I can't
AP> remember where this is originally sourced from unfortunately (but i
On Fri, 21 Dec 2007 20:53:55 -0500 John Siracusa <[EMAIL PROTECTED]> wrote:
JS> On 12/21/07 8:39 PM, Adam Prime wrote:
>> sub init_convention_manager {
>> my $self = shift;
>>
>> my $cm = $self->SUPER::init_convention_manager(@_);
>>
>> $cm->singular_to_plural_function(\&Lingua::EN::Inflect::Nu
On Fri, 21 Dec 2007 16:11:08 -0800 Darren Duncan <[EMAIL PROTECTED]> wrote:
DD> At 6:20 PM -0500 12/21/07, John Siracusa wrote:
>> On 12/21/07 3:43 PM, Ted Zlatanov wrote:
>>> I've set up all the right things in a Rose::DB class to support this.
>>> Now I fi
On Fri, 21 Dec 2007 15:59:58 -0500 Hans Dieter Pearcey <[EMAIL PROTECTED]>
wrote:
HDP> On Fri, Dec 21, 2007 at 02:56:07PM -0600, Ted Zlatanov wrote:
>> I couldn't find an example in the docs of how to set up
>> Rose::DB::Object::Loader with a properly pluralizing conv
I couldn't find an example in the docs of how to set up
Rose::DB::Object::Loader with a properly pluralizing convention manager.
I tried the following, but I keep getting a class called "Currencie"
from a table called "currencies" for example. I must be missing
something.
Ted
package My::DB::Met
Let's say I have two DB domains: prod/dev and two DB types: a/b. All
four combinations have 99% of the same data structure but need different
login info and some slightly different fields (e.g. the table 'cats' in
dev-a has an extra timestamp column).
I've set up all the right things in a Rose::D
On Wed, 12 Dec 2007 10:14:27 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
JS> The basic idea (safe repeated auto-generation with all
JS> customizations stored elsewhere) has been done several different
JS> ways in RDBO by others, and I've been meaning to formalize at least
JS> one way to do i
I played with the Cayenne Java ORM last week. I didn't like it much
(it's very inferior to RDBO, especially in auto-generating from the
schema), but one idea that caught my eye was the 'auto' hierarchy.
Basically you get a hierarchy like this (naming simplified):
cayenne.BaseObject
parent of
On Tue, 11 Dec 2007 12:10:00 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
JS> The undef_sets_null feature that alters the behavior of default
JS> columns values will almost certainly go out in the next release (which
JS> is coming soon). It may or may not be public (depending on if I have
JS
I needed to write the following method:
# override the RDBO::Helpers method
sub column_values_as_json_overrides
{
my $self = shift @_;
my $select = shift @_;
# local $self->{STATE_SAVING()} = 1;
my $data = Rose::DB::Object::Helpers::column_value_pairs($self);
my %out = ();
foreach (keys %$s
On Fri, 16 Mar 2007 10:37:14 -0400 "John Siracusa" <[EMAIL PROTECTED]> wrote:
>> Just wondering if there might already exist some way to easily convert the
>> hierarchical hash to and from a Rose DB Object that corresponds to the
>> hierarchical data in the Rose DB Object (that corresponds to the
On Thu, 01 Mar 2007 11:01:05 -0800 merlyn@stonehenge.com (Randal L. Schwartz)
wrote:
>>>>>> "Jonathan" == Jonathan Vanasco <[EMAIL PROTECTED]> writes:
Jonathan> On Mar 1, 2007, at 11:30 AM, Ted Zlatanov wrote:
Jonathan> so i've been caching results
On Thu, 01 Mar 2007 09:44:37 -0500 Ted Zlatanov <[EMAIL PROTECTED]> wrote:
TZ> On Wed, 28 Feb 2007 19:47:54 -0500 Jonathan Vanasco <[EMAIL PROTECTED]>
wrote:
JV> would it be possible to reserve a namespace within rose db objects
JV> for user use?
JV> i need to cache
On Wed, 28 Feb 2007 19:47:54 -0500 Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
JV> would it be possible to reserve a namespace within rose db objects
JV> for user use?
JV> i need to cache some calculated data in an object for use over
JV> multiple calls
You could use a TEMP column. I don't
On Wed, 21 Feb 2007 09:40:53 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
JS> You're right that the on_set trigger happens after the column value
JS> has been set. I could probably stand to add a few more trigger events
JS> (e.g., before_set) but I'm wary of trigger-itis gumming up the works
On Fri, 16 Feb 2007 13:11:05 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
JS> How do people feel about the following shortcuts?
Manager-> get_objects([ a => 1, b => 2 ]);
Manager-> get_objects({ a => 1, b => 2 });
JS> Both being equivalent to:
Manager-> get_objects(query => [ a => 1, b => 2
On Thu, 8 Feb 2007 23:16:24 -0500 Jonathan Vanasco <[EMAIL PROTECTED]> wrote:
JV> I've been doing a lot of repetitive operations on the results from
JV> manager functions lately.
JV> Today I think I realized a functionality that might make sense -- if
JV> the results returned by a manager ca
On Tue, 6 Feb 2007 13:19:37 -0500 "John Siracusa" <[EMAIL PROTECTED]> wrote:
JS> After doing that, you could set prices to undef to cause the
JS> collection to be re-fetched from the database on the next access:
JS> my($price) = grep { $_->region eq 'UK' } $p->prices;
JS> $price->delete;
On 31 Jan 2007, [EMAIL PROTECTED] wrote:
On 1/31/07, Ted Zlatanov <[EMAIL PROTECTED]> wrote:
> > I would also ask for a load_speculative() method, which simply calls
> > load with (speculative=>1). I know about default_load_speculative,
> > this is a local over
On 30 Jan 2007, [EMAIL PROTECTED] wrote:
> In SVN, I've just added a new method type to one-to-many relationships
> (no docs yet). Right now, I'm calling it "find". It's for fetching
> related objects using ad-hoc queries instead of being constrained to
> the mapping defined in the relationship
On 16 Jan 2007, [EMAIL PROTECTED] wrote:
> On 1/15/07, Cory Bennett <[EMAIL PROTECTED]> wrote:
> > Ahh, found the magic.
> > In Rose::DB::Object::Metadata::Relationship::OneToMany I found the special
> > (but buried) 'query_args' variable. So this will do what I want:
> > relationships => [
>
On 11 Jan 2007, [EMAIL PROTECTED] wrote:
> On Jan 11, 2007, at 3:54 PM, John Siracusa wrote:
> >
> > If so, let's go with "Debug" instead of "Debugging". I picked
> > "Debugging"
> > before because I didn't want any confusion with the various $Debug
> > package
> > variables, but if everythin
On 6 Dec 2006, [EMAIL PROTECTED] wrote:
On 12/6/06, John Siracusa <[EMAIL PROTECTED]> wrote: > On 12/6/06 12:44 AM,
Clayton Scott wrote:
>>> 2. create a sequence called _seq
>>
>> That's the crux of it. It looks like I'll have to just pick a naming scheme
>> and say, "If you deviate from this,
On 10 Jul 2006, [EMAIL PROTECTED] wrote:
> Hm, seems like people have different goals here. My goal was simply
> to be able to round-trip from Perl to YAML/JSON and then back to
> Perl.
Ah, I understand. A simple hash makes more sense in that case, the
way you had it originally.
Ted
On 10 Jul 2006, [EMAIL PROTECTED] wrote:
> Any ideas on the format for these? For example, I've got a
> column_values_as_yaml() helper method like this:
>
> $o = My::Object->new(a => 1, b => 2, c => 3);
>
> print $o->column_values_as_yaml;
>
> which prints:
>
> a: 1
> b: 2
> c: 3
>
> But then wha
On 30 Jun 2006, [EMAIL PROTECTED] wrote:
On 6/30/06 5:33 PM, Jonathan Vanasco wrote:
>> it'd be best not to have the rdb-object in a session anyways. i try
>> to keep session data into a structure that has pure data and can
>> serialize into json/yaml, as i often need to share between mod_perl
>>
On 30 May 2006, [EMAIL PROTECTED] wrote:
> 1. setup() will only run once. (An override will be available to
> force it to run more than once.)
So this makes "unless(__PACKAGE__->meta->is_initialized)" unnecessary?
Great!
> 3. Any class referenced in a foreign key or relationship will be
> requi
On 29 May 2006, [EMAIL PROTECTED] wrote:
On 5/29/06 6:21 AM, Svilen Ivanov wrote:
>> I would like to extend RDBO to support versioning of properties for each
>> instance.
> I've done this a few different ways in the past. The "safest" way, IME, is
> to let the database do almost all of the work,
On 25 May 2006, [EMAIL PROTECTED] wrote:
> I'm an ecstatic postgres user now though
Ah, never mind, your followup explained it, you really meant "mysql"
Sorry for the interruption
Ted
---
All the advantages of Linux Managed Hosting--Without
On 25 May 2006, [EMAIL PROTECTED] wrote:
> pg's now() @begin is nifty, because the timestamp essentially becomes
> a transaction id. i don't think that its unique enough to be an
> actual transaction id, but it is super useful for debugging.
>
> after some particularly bad experiences with the DB
On 10 May 2006, [EMAIL PROTECTED] wrote:
> * Return a reference to an array of added objects
> * Return the first added object.
>
> Hm, I'm not sure I like those much either. What I'm worried about is this:
>
> $widget = $o->add_widgets($some_widget);
>
> The only way that works is if add_widgets
On 10 May 2006, [EMAIL PROTECTED] wrote:
> Oh well, I think replace_column() is more clear anyway. I'll add it
> in the next version.
"replace" still has connotations of a permanent change. Why not
"remap"?
Ted
---
Using Tomcat but need to
On 9 Mar 2006, [EMAIL PROTECTED] wrote:
> I'm adding a Rose::DB::Object::Helpers module to house all of the "extra"
> methods that people might want, but that I don't want crowding
> Rose::DB::Object itself. Example usage:
>
> package MyDBObject;
>
> use base 'Rose::DB::Object';
> use Rose::DB:
On 14 Mar 2006, [EMAIL PROTECTED] wrote:
> Can you think of a good way to pass custom manager_args to individual calls
> to a relationship accessor? Maybe a new read-only accessor type where
> arguments can't possible be meant to set values?
Maybe this will work:
$company->products({ id => 123
47 matches
Mail list logo