On 1/31/06 12:59 AM, Ron Savage wrote:
> My plan is to solicit advice on the subs in Rose::DB::Pg, and convert them to
> Rose::DB::Oracle, build_dsn() being the first. Better ideas accepted.
> 
> I realize Oracle supports a myriad of forms (syntaxes) for the connection
> string.
> 
> The question is: What subset of these do we wish to accept?

There are two ways to provide data source information to a Rose::DB object.
One way is to provide components: hostname, port, database, etc.  From this
information, RDB will synthesize a DBI DSN string using a private method
called build_dsn().  This synthesis need only create a single format of DSN.

The second way is to pass an already-formed DSN string, setting it using the
dsn() method.  The behavior of that method is documented here:

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

So, an explicit DSN is simply used as-is, and components are combined to
create a DSN.  While RDB will try to parse an explicit DSN and pull out the
components, there is no guarantee that this will be successful.  IOW, since
existing Rose::DB::* classes don't parse every DSN format supported by each
DBD, Rose::DB::Oracle doesn't have to either.

In the common case, connection info will be supplied as components in a
Rose::DB::Registry::Entry.  The DSN parsing is just a "nice to have" thing
for the less common case of an explicit DSN.

-John




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to