Re: [RDBO] Anyone done more advanced caching with rdbo?

2008-01-29 Thread Jonathan Swartz
CHI works with memcached - http://cpan.uwinnipeg.ca/htdocs/CHI/CHI/ Driver/Memcached.html :) I think your proposal sounds very useful! Jon On Jan 29, 2008, at 1:52 PM, Justin Ellison wrote: > Hi list, > > First, let me apologize for sending my last email to the list - I > should > have chec

[RDBO] meta / setup design

2007-11-16 Thread Jonathan Vanasco
John- Would you mind elaborating on how __PACKAGE__->meta and ->setup work? I was working on new ways to automagically call/include my rose objects ( ie: include an entire perl namespace at once, not each individual file ) and hijack the setup registry to push some information elsewhere. i

Re: [RDBO] Wanted: Perl programmers (Boston, MA)

2007-11-16 Thread Jonathan Vanasco
On Nov 14, 2007, at 3:56 PM, John Siracusa wrote: > On Nov 14, 2007 2:59 PM, Darren Duncan <[EMAIL PROTECTED]> > wrote: >> Or I see something about a company that does online gambling. > > That's the one :) "This position requires does require occasionally lifting up to 20 (twenty) pounds"

Re: [RDBO] 'Operation "ne": no method found' in QueryBuilder::build_select

2007-11-11 Thread Jonathan Swartz
> On 11/6/07 5:18 PM, Jonathan Swartz wrote: >> On Oct 30, 2007, at 7:54 AM, John Siracusa wrote: >>> Can you edit QueryBuilder.pm to see if you can at least work >>> around it? For >>> example, use $column->name ne $method instead of relying on >&g

Re: [RDBO] 'Operation "ne": no method found' in QueryBuilder::build_select

2007-11-06 Thread Jonathan Swartz
On Oct 30, 2007, at 7:54 AM, John Siracusa wrote: > On 10/30/07, Jonathan Swartz <[EMAIL PROTECTED]> wrote: >> $column is a Rose::DB::Object::Metadata::Column::Timestamp, according >> to the error. The errors originate from all sorts of operations, but >> they al

Re: [RDBO] 'Operation "ne": no method found' in QueryBuilder::build_select

2007-10-30 Thread Jonathan Swartz
On Oct 30, 2007, at 7:54 AM, John Siracusa wrote: > On 10/30/07, Jonathan Swartz <[EMAIL PROTECTED]> wrote: >> $column is a Rose::DB::Object::Metadata::Column::Timestamp, according >> to the error. The errors originate from all sorts of operations, but >> they al

Re: [RDBO] 'Operation "ne": no method found' in QueryBuilder::build_select

2007-10-30 Thread Jonathan Swartz
On Oct 29, 2007, at 5:08 PM, John Siracusa wrote: > On 10/29/07 7:41 PM, Jonathan Swartz wrote: >> A few days ago we started getting this error intermittently in >> QueryBuilder::build_select: >> >> error_log.2007-10-29:[Mon Oct 29 15:29:37 2007] [error] [client

[RDBO] 'Operation "ne": no method found' in QueryBuilder::build_select

2007-10-29 Thread Jonathan Swartz
A few days ago we started getting this error intermittently in QueryBuilder::build_select: error_log.2007-10-29:[Mon Oct 29 15:29:37 2007] [error] [client 69.26.166.38] Operation "ne": no method found, left argument has no overloaded magic, right argument in overloaded package Rose::D

[RDBO] Install Error

2007-10-13 Thread Jonathan Vanasco
Anyone else get this when updating? t/setup...NOK 3/4 # Failed test 'ROSEDBRC 2' # in t/setup.t at line 22. # got: 'localhost' # expected: 'othervalue' # Looks like you failed 1 test of 4. t/setup...dubious Test returned status 1 (wstat 25

[RDBO] neutralizing Rose::DB's reference counting

2007-09-26 Thread Jonathan Swartz
Hi, I find Rose::DB's reference counting of DBI handles confusing, and would like to effectively neutralize it for my entire project. For example I want $dbh = Rose::DB->new()->dbh to work even though it is incorrect (because it is such a common mistake to make). I'm happy to let DBI j

Re: [RDBO] has_loaded_related issue

2007-08-12 Thread Jonathan Vanasco
s sort of stuff for me... On Aug 11, 2007, at 9:08 PM, John Siracusa wrote: > On 8/11/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: >> so let me rephrase this question: >> i thought strip() wasn't supposed to remove fkeys/rels ? >> it seems >> t

Re: [RDBO] has_loaded_related issue

2007-08-11 Thread Jonathan Vanasco
e for writing with_objects instead of with. it was correct on my code, just not on the posting. // Jonathan Vanasco Founder/President - FindMeOn Fonder/CEO - Road

[RDBO] has_loaded_related issue

2007-08-11 Thread Jonathan Vanasco
using .765 has_loaded_related ( helpers ) keeps returning false, when the related item is loaded via a manager with_objects call ( and i know its via a data::dumper profile ) $obj= $class->load( with_objects=>['subclass'] ); print "this always returns false " . $obj->has_loade

Re: [RDBO] Extending Rose::DB::Object::Helpers

2007-08-08 Thread Jonathan Vanasco
Kevin- I usually get the effect you want in a slightly different way a) I have Oasis::Model::Asset::Object::Helpers b) but I might also have Oasis::Model::Asset::Object::Helpers_SpecifcNameHere c) when i need a function in a rose object, i just stuff Oasis::Model::Asset::Ob

Re: [RDBO] Feature Request - for_update

2007-07-11 Thread Jonathan Vanasco
John posted some suggestions on getting it done, you can check the archives for them. // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Re: [RDBO] math::bigint & pg

2007-07-10 Thread Jonathan Vanasco
On Jul 10, 2007, at 9:49 AM, John Siracusa wrote: > On 7/9/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: >> here's my testcase, reproduced on 3 machines (all running current >> rose::db::object , not svn ) > > I see the bug when using 0.764 from CPAN, but I can

Re: [RDBO] More on nested transactions

2007-07-09 Thread Jonathan Vanasco
ansactions belong in an ORM-- they belong in your application code. // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | CEO/Founder SyndiClick Networks | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Re: [RDBO] More on nested transactions

2007-07-09 Thread Jonathan Vanasco
saction start . otherwise, i like tylers interface much more than my own, and am hoping to migrate to it soon. // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Re: [RDBO] math::bigint & pg

2007-07-09 Thread Jonathan Vanasco
onvenience method, which will print the current state of the obj to STDERR. comes up as a 0 every time. looking at the pg table , it inserts a 0 as well, not an undef. i must be doing something blatantly wrong here -- and someone will notice it just looking at the class setup. i hope so.

Re: [RDBO] feature request -> is not

2007-07-09 Thread Jonathan Vanasco
On Jul 9, 2007, at 11:34 AM, John Siracusa wrote: > I've added is/is_not operators to QueryBuilder in SVN. Give them a > spin and let me know if they do what you want. awesome. will test tonight can't wait to rid the 'clauses' sections from my manag

[RDBO] math::bigint & pg

2007-07-08 Thread Jonathan Vanasco
setting this col to undef, and it is not a 'not_null' col suggestions? - Jonathan Vanasco - findmeon.com / RoadSound.com Sent from my iPhone - This SF.net email is sponsored by DB2 Express Download DB2 Express C - t

Re: [RDBO] update without load ?

2007-07-05 Thread Jonathan Vanasco
object_class=> object_class(), seems to work. thanks! // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

[RDBO] update without load ?

2007-07-04 Thread Jonathan Vanasco
o+cto sucks, but I have a new operations guy starting next week! // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | CEO/Founder SyndiClick Networks | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Re: [RDBO] Separate Read and Write Database Connections

2007-06-24 Thread Jonathan Vanasco
On Jun 20, 2007, at 12:16 AM, David Lloyd wrote: > > Is it possible to have separate read and write database connections in > Rose::DB::Object? > > For example, I might have read to: > > read.db.com > > ...and...write to: > > write.db.com > > ...is it possible to get any updates/deletes and i

Re: [RDBO] on the fly fields

2007-06-24 Thread Jonathan Vanasco
array instead of a normal array. the blessed array had sort and other methods on it... so the code to interact would be: my $names= myapp::names::manager->load_names(); foreach my $name ( @{$names->blessed_class_

Re: [RDBO] on the fly fields

2007-06-22 Thread Jonathan Vanasco
{'com.2xlp'}{'F_display_only_b'} ; $self->{'com.2xlp'}{'F_display_only_b'}= ( $self->id * 3.1417 ) * 2; return $self->{'com.2xlp'}{'F_display_only_b

Re: [RDBO] defined'ness of getters for missing not-null fields

2007-06-21 Thread Jonathan Swartz
or primary column to be silently "inserted" into my search? This seems like a side-effect of using the same object to both initiate a search (with load()) and to insert a new row. I'm sure there's some history and good justification behind this decision, though. Jon O

Re: [RDBO] defined'ness of getters for missing not-null fields

2007-06-21 Thread Jonathan Swartz
Thanks. I had the feeling it would be a short answer. :) Jon On Jun 21, 2007, at 11:07 AM, John Siracusa wrote: > On 6/21/07, Jonathan Swartz <[EMAIL PROTECTED]> wrote: >> If I create a new Rose::DB::Object without specifying some not-null >> fields, should the getter

[RDBO] defined'ness of getters for missing not-null fields

2007-06-21 Thread Jonathan Swartz
If I create a new Rose::DB::Object without specifying some not-null fields, should the getters return a defined or undefined value? The following script provides different answers for sqlite and mysql. swartz> ./rose.pl sqlite email is not defined swartz> ./rose.pl mysql email is defined and I

Re: [RDBO] Code for Generating RDBO's for All Tables

2007-06-15 Thread Jonathan Vanasco
On Jun 16, 2007, at 1:11 AM, Jeffrey Horn wrote: > Aw shucks! You guys think of everything! :) > > Thanks! This is exactly what I was looking for! > > -- Jeff Horn i think thats pretty much straight from the docs i just converted a micro-app to rose last night, and had that handy ;) ---

Re: [RDBO] Code for Generating RDBO's for All Tables

2007-06-15 Thread Jonathan Vanasco
On Jun 15, 2007, at 6:40 PM, Jeffrey Horn wrote: > I'm wondering if there's any code out there that will generate > Rose::DB::Object's for all tables in a database. I have my own > makeshift > version which will do it for a given table, and the loop to simply > iterate > through tables isn't

Re: [RDBO] wishlist - better error message for incompatible type situation

2007-06-06 Thread Jonathan Vanasco
On Jun 5, 2007, at 8:36 AM, John Siracusa wrote: > > I made some changes to the error messages in SVN, but I could make > them better if you could give me a concrete example of a call that > produces an error for you, and what you'd like the error to be > instead. > Again, I think I need to see

[RDBO] wishlist - better error message for incompatible type situation

2007-06-04 Thread Jonathan Vanasco
value ) b- note the manager function. in order to trace, i find myself opening 1 file to see which function i'm calling, then i get to open the manager file it would be even neater if rose could just infer/guess something or bypass this -- since rose uses bind variables, there shouldn&#

Re: [RDBO] getter/setters for relationships

2007-06-04 Thread Jonathan Vanasco
On Jun 4, 2007, at 12:35 PM, John Siracusa wrote: > Yes, and it works the same way as for columns. Like columns, > relationships and foreign keys have N named method types created on > their behalf. Examples of method type names are get, get_set, > get_set_on_save, find, count, etc. There are

[RDBO] getter/setters for relationships

2007-06-04 Thread Jonathan Vanasco
$b= b->new(); $a->b( $b ); right now i'm using the relationship name, because it works. but thats not the best way. do column_accessor_value_pairs/column_mutator_value_pairs work for relation names too? can we have a seperate relation function ?

Re: [RDBO] Streamlining documentation

2007-06-03 Thread Jonathan Vanasco
sorry this took so long to respond -- been too busy on the business side of work, little time for code. On May 18, 2007, at 2:21 PM, John Siracusa wrote: > I think it's pretty clear given that the table definition is right > above it, and contains: > > UNIQUE(product_id, region) ok. th

Re: [RDBO] bug - similar names kill with_objects calls

2007-06-01 Thread Jonathan Vanasco
ed the rose code and pglog -- and it gave every indication rose wasn't. Then other sections started failing with random code and modules. I have no idea WTF happened. //

Re: [RDBO] bug - similar names kill with_objects calls

2007-05-31 Thread Jonathan Vanasco
please disregard the last question. additional troubleshooting showed that , somehow , perl on that dev box is completely corrupted. reinstalling *everything* seems to have fixed it after we tested the same app on another server. -

[RDBO] bug - similar names kill with_objects calls

2007-05-31 Thread Jonathan Vanasco
SELECT t1.available_api_application_keys AS t1_available_api_application_keys and using a lookup hash to map t1_available_api_application_keys to the t1 object and column when creating objects // Jonathan Vanasco | - - - - - - - - - - - - - - - -

Re: [RDBO] relationships -> foreign keys

2007-05-29 Thread Jonathan Vanasco
where appropriate, but it will do a one-to-many at the least. On a side note-- if you're migrating to innodb and using foreign keys, i'd suggest taking out any mysqlisms while your at it ( converting set/enum cols to lookup tables , etc ). if you ever want to switch dbs from

Re: [RDBO] Namespace for 3rd-party RDBO modules

2007-05-23 Thread Jonathan Vanasco
On May 23, 2007, at 9:36 AM, John Siracusa wrote: > Does anyone have any good ideas for a namespace for module that > augment or > extend RDBO, but that are not part of the "official" RDBO > distribution? The > first thing that springs to my mind is: > > Rose::DBx::* At first I really l

Re: [RDBO] Streamlining documentation

2007-05-18 Thread Jonathan Vanasco
que keys don't have names, they have columns. foreign keys and relationships have user defined names. thats my documentation gripe of the week :) // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - -

Re: [RDBO] cascading Manager queries

2007-05-17 Thread Jonathan Vanasco
On May 17, 2007, at 3:12 PM, Michael Reece wrote: > here is a bit of ugliness that hints at what i am after: I think i do some similar stuff, so I'll give my advice -- which you may be better off to not take ;) I never use 'make manager methods'. i started it as a memory saver because i us

Re: [RDBO] feature request: not not_found (found?)

2007-05-17 Thread Jonathan Vanasco
hen called-- but the only way to get at that elsewhere in your code is by calling ! not_found -- which is like an evil tongue twister. I'm using my own found method in a base class to keep my sanity (

[RDBO] small bug in use_key

2007-05-16 Thread Jonathan Vanasco
ow there is no where clause, if 'use_key' is removed, we get SELECT id , name FROM item WHERE id = ? - bind params: 10 // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | SyndiClick.com | - - - - - - -

Re: [RDBO] re-using relationships with extra conditions

2007-05-11 Thread Jonathan Vanasco
; have you looked at the manager class ? http://search.cpan.org/~jsiracusa/Rose-DB-Object-0.764/lib/Rose/DB/ Object/Manager.pm i think that should handle everything you need. /

[RDBO] Style Question

2007-05-11 Thread Jonathan Vanasco
I'm trying to consolidate + standardize some code. I realized several manager methods were identical, so I merged them into a shared manager class. Can anyone suggest a better way than what follows ? Basically, I just have these objects inherit from another manager subclass, which calls $cla

[RDBO] feedback? related_index

2007-05-05 Thread Jonathan Vanasco
I'm making quite a bit of custom rose functions for my projects , and looking for feedback on some that i think would be useful if rolled back into Rose::DB::Helpers the newest one is related_index related_index takes a rose object and creates an internal hash to quickly access specific LO

Re: [RDBO] ANNOUNCE: Rose::DB::Object 0.764 released

2007-05-04 Thread Jonathan Vanasco
ng code, bug fixes, or just suggestions. its even longer than you think: at the least, you missed documenting the strip() feature in the changelog! // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | Sy

Re: [RDBO] Release soon

2007-05-03 Thread Jonathan Vanasco
On May 1, 2007, at 3:25 PM, John Siracusa wrote: > As for sharing the code, didn't Jonathan post it earlier? The SVN is now here: http://dev.2xlp.com/svn/mod_perl/cpan_patches/Rose/Rose-DB-Object/ JsonYamlObjectTree/trunk/ It still doesn't support TimeStamp or any

Re: [RDBO] Datatype generator

2007-05-02 Thread Jonathan Vanasco
On May 2, 2007, at 1:54 PM, John Siracusa wrote: > You can do this already, more or less, by making your own > My::EmailColumn class based on Rose::DB::Object::Metadata::Column, > then mapping that class to a type name using > meta->column_type_class(email => 'My::EmailColumn'). Then, in your >

Re: [RDBO] Datatype generator

2007-05-02 Thread Jonathan Vanasco
On May 2, 2007, at 10:13 AM, John Siracusa wrote: >> I can write this: >> >> reason => SCALAR( 255, DEFAULT '', NOT_NULL, LAZY ), > > Cute :) Nice. This reminds me of an idea I had a while ago... I wrote my own form class a few years back, because none of the CPAN modules could meet my fun

Re: [RDBO] Release soon

2007-05-01 Thread Jonathan Vanasco
On May 1, 2007, at 3:08 PM, Derek Watson wrote: > I feel like I'm repeating work here -- I've got a similar set of > functions that serialize and restore trees of objects, only I'm doing > this in a very specific way, keeping only what I want from specific > classes (not reusable). > > What are t

Re: [RDBO] Release soon

2007-05-01 Thread Jonathan Vanasco
On May 1, 2007, at 3:25 PM, John Siracusa wrote: > It won't be in 0.764. It's too young and I want to wring it out a bit > first. For 0.765, if it has tests and docs and we're all happy with > the API and behavior, sure. As for sharing the code, didn't Jonathan &

Re: [RDBO] feature request -> is not

2007-05-01 Thread Jonathan Vanasco
On May 1, 2007, at 10:32 AM, John Siracusa wrote: > That's not going to make it into 0.764, but a feature that is in 0.764 > might help you: > > query => > [ > \q(is_selected is not false), # literal SQL > ... > ], I didn't expect .764 I've got it covered now using t

[RDBO] feature request -> is not

2007-04-30 Thread Jonathan Vanasco
i'd like to see an "is not" operator something like: '!NAME' => undef# COLUMN IS NOT NULL under postgres, booleans behave as such: example table create table test ( id integer not null , is_selected boolean ); insert into test ( id , is_selected ) values ( 1 , NU

Re: [RDBO] Release soon

2007-04-30 Thread Jonathan Vanasco
On Apr 30, 2007, at 4:37 PM, John Siracusa wrote: > Even though there are a bunch of things on my short-term list that I > haven't gotten to, the change list is already quite large and I want > to cut a release soon (it will be 0.764). Is there any feature that I > previously mentioned I'd get t

Re: [RDBO] Delays

2007-04-27 Thread Jonathan Vanasco
On Apr 27, 2007, at 10:25 AM, John Siracusa wrote: > Sorry for any delays in responding to RDBO issues or email. We just > had a baby (our second) and things will likely be a bit hectic here > for a while... :) Congrats! // Jonatha

Re: [RDBO] Rose internals question

2007-04-26 Thread Jonathan Vanasco
On Apr 26, 2007, at 6:18 PM, Jonathan Vanasco wrote: > > e) when restoring an object, I'm trying to figure out how stuff the > foreign keys and relationships. i can bring them up as new objects > just fine, but there aren't really any rose methods for stuffin

[RDBO] Rose internals question

2007-04-26 Thread Jonathan Vanasco
i wrote the following functions , which are pretty much nice and fine : object_tree_to_json object_tree_to_yaml object_tree_to_hash i'm now working on object_tree_from_json object_tree_from_yaml object_tree_from_hash and running into a few issues

Re: [RDBO] (wishlist) Distributed Key Support

2007-04-23 Thread Jonathan Vanasco
> My only concern was how portable the solution would be. > Theoretically, > Rose could add enough value to make it work regardless of the > database. > For example, right now, our version of MySQL silently truncates > values > not in an enum list and add the empty string into enum fields.

Re: [RDBO] object caching functionality

2007-04-21 Thread Jonathan Vanasco
;m struggling with the sf svn server. it keeps dropping out. hopefully i can pull a complete copy to test. Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Re: [RDBO] Bizarre. New PC. Everything faster except Rose which is5X slower!

2007-04-20 Thread Jonathan Vanasco
uery the table structure itself is the same, but using explain you can understand and influence how the planner plans on a small dataset, the difference is negligble. but on a set of 40million rows, the difference is betwe

Re: [RDBO] Scratchpad Space in RDBOs???

2007-04-20 Thread Jonathan Vanasco
On Apr 20, 2007, at 11:06 AM, John Siracusa wrote: > On 4/19/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: >> Would it be terribly difficult to port: >> >> Rose::DB::Object::MixIn >> >> into >> >> Rose::Object::MixIn >

Re: [RDBO] Bizarre. New PC. Everything faster except Rose which is 5X slower!

2007-04-20 Thread Jonathan Vanasco
my guy feeling is that maybe you lost some indexes on db tables during the migration i'd do a raw test in a sql client directly, bench query on each and use 'explain' to see how the planner is attempting the call - This

Re: [RDBO] Scratchpad Space in RDBOs???

2007-04-19 Thread Jonathan Vanasco
calls to Rose::Class::MakeMethods::Set , which should work on the Rose::Object base class ( at least with my limited understanding of that stuff ) // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Re: [RDBO] object caching functionality

2007-04-18 Thread Jonathan Vanasco
a few days to deal with regex hell for now // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |

Re: [RDBO] object caching functionality

2007-04-18 Thread Jonathan Vanasco
On Apr 18, 2007, at 10:22 AM, John Siracusa wrote: > On 4/17/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: >> Though that can be handled using a strip helper alone too -- we'd >> just need an unstrip() function that builds back in a db object and >> meta

Re: [RDBO] object caching functionality

2007-04-17 Thread Jonathan Vanasco
e layer would have its own information to strip ) Though that can be handled using a strip helper alone too -- we'd just need an unstrip() function that builds back in a db object and metadata, and we'd need to loop each object for the right information to strip or not. the one PITA all t

Re: [RDBO] object caching functionality

2007-04-17 Thread Jonathan Vanasco
of all this is to create cachable objects that are as- small-as-possible when they go into memory, yet have almost no overhead to revive. its rather a large request for restructuring rose for

[RDBO] object caching functionality

2007-04-16 Thread Jonathan Vanasco
I'm going to need to cache my objects into memcached , and looking for options. the quick&dirty way would be to just use storable. i think cache::memcached should be able to bring back the entire object structure -- including nested objects has anyone done this? pros / cons ? my other op

Re: [RDBO] 4 key map table advice sought

2007-04-16 Thread Jonathan Vanasco
1 }, color_id => { type => 'bigint', not_null => 1 }, foreign_keys => [ product=> { class => 'MyApp::Product', key_columns => { product_id => 'id' },

Re: [RDBO] Read-only objects

2007-04-16 Thread Jonathan Vanasco
urns the same cols as the real item b- subclass the RODB obj and just change the table name in the package meta. Which would give you a RODB obj that will always fail on DB writes. Granted, that only

[RDBO] 4 key map table advice sought

2007-04-16 Thread Jonathan Vanasco
I have a 4 key map table , and its confusing me how to do this in rose. Rose Tutorial: Products id , name Colors id , name Product2Color product_id , color_id My Setup Adds in a 'user' fkey + time to track the assignment of

Re: [RDBO] using functions

2007-04-15 Thread Jonathan Vanasco
On Apr 15, 2007, at 3:50 PM, John Siracusa wrote: > On 4/14/07 1:16 AM, Jonathan Vanasco wrote: >> is there a way to get Rose to search based on functions? >> >> ie: >> bad >> SELECT * FROM useraccount WHERE email = ? >> good >> SELECT * FROM user

[RDBO] using functions

2007-04-13 Thread Jonathan Vanasco
is there a way to get Rose to search based on functions? ie: bad SELECT * FROM useraccount WHERE email = ? good SELECT * FROM useraccount WHERE lower(email) = lower(?) the second query will be optimized by the postgres planner to search on this in

Re: [RDBO] dbh caching

2007-04-13 Thread Jonathan Vanasco
ting with the factory -- telling it to begin/rollback/commit. I use my own version of DB handles that are similar to DBIx-Transaction -- the big difference is that i overload connect and disconnect to become their own nested transaction blocks.

Re: [RDBO] Possible to use load() to get a exclusive lock???

2007-04-10 Thread Jonathan Vanasco
you're in Mysql5 -- can't you use a function or stored procedure to emulate that better? also, if you're worried about concurrency, why not just stuff your rose objects with a dbh that is in a transaction and handle s

Re: [RDBO] Read-only objects

2007-04-06 Thread Jonathan Vanasco
r have new object that is makes use of existing helper methods like clone or init_with_xxx , in the context of a clone style call or instantiation hook basically, i want to have my cake and eat i

Re: [RDBO] Read-only objects

2007-04-06 Thread Jonathan Vanasco
On Apr 6, 2007, at 10:01 AM, John Siracusa wrote: > On 4/5/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: >> Any chance of these features being pushed back into rose? > > The first thing you're likely to see is support for triggers on save, > insert, update, and d

Re: [RDBO] Read-only objects

2007-04-05 Thread Jonathan Vanasco
_with_column_value_pairs( $writer->column_value_pairs ); or my $reader= $writer->clone(); bless( $reader , MyApp::RoseDb::Object::ReadonlyFoo ); // Jonathan Vanasc

Re: [RDBO] Read-only objects

2007-04-04 Thread Jonathan Vanasco
call me lazy-- I just use a bad db handle for all things rose, then have a custom method that pulls a read-only or read/write handle from a db factory as needed. ie, they'll always fail on save, insert, update because they don't have the db permissions ---

Re: [RDBO] Loader: request and doc change

2007-04-02 Thread Jonathan Vanasco
ng the shell manager classes created for all my modules, but i don't use the default manager methods . i fill that class with custom calls as needed. I just regex it out in 5 seconds, but I think thats marginally useful to others. perhaps not. // Jonat

[RDBO] docs request

2007-04-02 Thread Jonathan Vanasco
I have a request for the docs: I'm adding a new table with 2 unique indexes / keys on it , one of which is a multiple column key. the docs are really unclear on how thats done in the setup. example: unique keys are: 1- single col - 'hex_id' 2- mult co

[RDBO] Loader: request and doc change

2007-04-01 Thread Jonathan Vanasco
doc change: with_managers seems to default to true , it should be listed as such feature request: it would be nice if a variation of with_managers could be called , that did not create: __PACKAGE__->make_manager_methods('useraccount'); ---

Re: [RDBO] loader dies if pg table has unique index when make_modules is called

2007-04-01 Thread Jonathan Vanasco
On Apr 2, 2007, at 1:31 AM, Jonathan Vanasco wrote: > > Lots of messages like this: > > Could not auto-retrieve unique keys for class > X::RoseDB::Object::X - No columns found for relation id > 174592, column numbers 0 at /Library/Perl/5.8.6/Rose/DB/Object/ > Metadat

[RDBO] loader dies if pg table has unique index when make_modules is called

2007-04-01 Thread Jonathan Vanasco
Lots of messages like this: Could not auto-retrieve unique keys for class X::RoseDB::Object::X - No columns found for relation id 174592, column numbers 0 at /Library/Perl/5.8.6/Rose/DB/Object/ Metadata/Auto/Pg.pm line 111. at /Library/Perl/5.8.6/Rose/DB/Object/Loader.pm line 889 wh

Re: [RDBO] Best way to do multiple calls to database

2007-03-29 Thread Jonathan Vanasco
On Mar 29, 2007, at 4:07 PM, James Masters wrote: > So when you say "startup", does this mean upon Apache startup or upon > your script startup? I can see that if it's in Apache's memory before > a script even runs, that would be hugely performance enhancing. apache startup. there's no point o

Re: [RDBO] Best way to do multiple calls to database

2007-03-29 Thread Jonathan Vanasco
On Mar 29, 2007, at 3:23 AM, James Masters wrote: > Thanks for your very helpful reply, Jonathan. It answered my general > question but I'm left with a couple of more specific ones. > > Pl. see in line. > >> I do that with ~20 tables that hold data I consider '

Re: [RDBO] Best way to do multiple calls to database

2007-03-27 Thread Jonathan Vanasco
ase itself , and thats greatly alleviated by persistant connections which most environments now support. make 2 queries or 40 queries probably isn't going to make any significant difference in your usability unless you're getting into the hundreds of requests per second situation or

Re: [RDBO] Sequence Support

2007-03-20 Thread Jonathan Vanasco
On Mar 20, 2007, at 7:02 PM, Jud wrote: > On 20/03/07 18:57 -0400, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: >> ok. its on my list right after the debugger module :) > > If you're actually putting together a debug module, I'd put in a > request > for a s

Re: [RDBO] Sequence Support

2007-03-20 Thread Jonathan Vanasco
27;d just have to add > more such methods. The Rose::DB::Sequence class wouldn't have any > db-specific code in it at all. well yes, but there would need to be a lot of conditionals in that module / the db specific drivers to implement the

Re: [RDBO] Sequence Support

2007-03-20 Thread Jonathan Vanasco
avoid blocking of concurrent transactions that obtain numbers from the same sequence, a nextval operation is never rolled back; that is, once a value has been fetched it is considered used, even if the transaction that did the nextval later aborts. T

Re: [RDBO] Debian & Rose

2007-03-19 Thread Jonathan Vanasco
e your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > ___

Re: [RDBO] Transactions, ACID etc.

2007-03-16 Thread Jonathan Vanasco
On Mar 16, 2007, at 1:12 PM, Randal L. Schwartz wrote: > package My::RDBO; > use base Rose::DB::Object; > use strict; > > sub init_db { > our $cached_db ||= do { > require My::RDB; # my Rose::DB subclass > My::RDB->new; > } > } > > 1; mine rel

Re: [RDBO] Transactions, ACID etc.

2007-03-16 Thread Jonathan Vanasco
ing a read- only dbh from a factory class that my entire application uses. As needed, I have a function that rose reset the db with a write dbh from the factory. it works exceedingly well for a clustered db environment. //

Re: [RDBO] Transactions, ACID etc.

2007-03-16 Thread Jonathan Vanasco
t; at best. no, that makes perfect sense: transactions are a part of application logic , not orms logic // Jonathan Vanasco | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Re: [RDBO] Beginner q. on date

2007-03-13 Thread Jonathan Vanasco
n your perl code a) -00-00 is a mysqlism for putting null dates in a not-null field -- most other dbs will not accept that as a date. b) many apps / modules across languages are designed to throw errors on invalid dates -- especially ones like th

Re: [RDBO] delete_prices()

2007-03-09 Thread Jonathan Vanasco
ips => [ vendor => 'many to one' ], (Again, this all depends on naming the tables, classes, and columns in accordance with the expectations of the convention manager.) The resulting vendor() and delete_vendor() methods behave exactly the same

[RDBO] postgres - select for update / select for share ?

2007-03-03 Thread Jonathan Vanasco
is there any way i can coerce this into rose queries? if not, any chance of including these as flags in the future? i'm having a db locking / blocking issue on a certain feature right now , and that would likely solve it. // Jonathan Va

  1   2   3   >