Re: [RDBO] Sharing a DBI connection with Class::DBI

2008-01-30 Thread Sam Tregar
On Jan 29, 2008 10:32 PM, John Siracusa [EMAIL PROTECTED] wrote:

 On 1/29/08, Sam Tregar [EMAIL PROTECTED] wrote:
  Do you happen to know if RDBO will tolerate a
  DBIx::ContextualFetch based DBI handle?
 It should, and if it doesn't, I can probably make it do so with some
 minor edits.  Give of a try and let me know.


Looks pretty good.  I setup a hacked Rose::DB with RootClass set to
DBIx::ContextualFetch by default and ran the Rose::DB::Object test suite
against it with MySQL.  Everything passed.  I'll let you know if I see
anything odd when I try to actually use it myself.

-sam
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object


Re: [RDBO] Sharing a DBI connection with Class::DBI

2008-01-29 Thread Sam Tregar
On Jan 29, 2008 9:55 PM, Peter Karman [EMAIL PROTECTED] wrote:

 just a naive guess here, but if you were using DBI-connect_cached as the
 underlying connect method, wouldn't DBI handle the sharing for you?


No, I'm pretty sure DBI uses the class as part of the connect_cached key.

-sam
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object


Re: [RDBO] Sharing a DBI connection with Class::DBI

2008-01-29 Thread Sam Tregar
On Jan 29, 2008 10:06 PM, John Siracusa [EMAIL PROTECTED] wrote:


 The db atribute of an RDBO-derived object isa Rose::DB, but each
 Rose::DB-derived object has a DBI $dbh.  IOW, plain old DBI database
 handles are used via delegation in RDBO.  There's no subclassing of
 DBI classes at all.


Good to hear.  Do you happen to know if RDBO will tolerate a
DBIx::ContextualFetch based DBI handle?

but keep in mind the new new_or_cached() Rose::DB method that makes a
 lot of the caching discussion in some older threads less relevant
 these days.

 http://search.cpan.org/dist/Rose-DB/lib/Rose/DB.pm#new_or_cached


Yes, I found that one - seems very useful.  Maybe something to add to the
tutorial?

Thanks for the help!

-sam
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object


Re: [RDBO] Sharing a DBI connection with Class::DBI

2008-01-29 Thread John Siracusa
On Jan 29, 2008 9:57 PM, Sam Tregar [EMAIL PROTECTED] wrote:
 On Jan 29, 2008 9:55 PM, Peter Karman [EMAIL PROTECTED] wrote:
  just a naive guess here, but if you were using DBI-connect_cached as the
  underlying connect method, wouldn't DBI handle the sharing for you?
 

 No, I'm pretty sure DBI uses the class as part of the connect_cached key.

And as for DBI's, connect_cached(), you can use that (instead of the
default connect()) in Rose::DB by overriding dbi_connect() in your
Rose::DB subclass:

http://search.cpan.org/dist/Rose-DB/lib/Rose/DB.pm#dbi_connect

-John

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object


Re: [RDBO] Sharing a DBI connection with Class::DBI

2008-01-29 Thread John Siracusa
On 1/29/08, Sam Tregar [EMAIL PROTECTED] wrote:
 Do you happen to know if RDBO will tolerate a
 DBIx::ContextualFetch based DBI handle?
It should, and if it doesn't, I can probably make it do so with some
minor edits.  Give of a try and let me know.

-John

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object