On Feb 1, 2008 3:46 PM, Ted Zlatanov <[EMAIL PROTECTED]> wrote:
> 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't know how much of the Pg driver
> functionality I need to reimplement.

The DBI API defines everything RDBO needs to know except looking up
unique keys (although it sort of added that too, recently).  The
problem is that most DBD:: drivers don't implement the entire DBI API,
or don't implement all parts correctly :)

In RDBO, the Pg auto-init stuff is the simplest since DBD::Pg is
really good about following the DBI spec.  But even then, there's some
refine_dbi_*() methods in Rose::DB::(Pg|MySQL|etc.) to "massage" the
output of DBI calls for certain database info.

The worse case (so far :) is Informix, because DBD::Informix
implements very few of the DBI introspection APIs.  That's why
Rose::DB::Object::Metadata::Auto::Informix is a horror show.

Basically, the nicer the DBD::Sybase is, the more you can rely on the
base Rose::DB::Object::Metadata::Auto and Rose::DB classes, and the
less code you'll need in Rose::DB::Object::Metadata::Auto::Sybase and
Rose::DB::Sybase.

Some additional background: I was trying to move all db introspection
stuff out of Rose::DB::Object::Metadata::Auto::* and into Rose::DB,
but the problem is that many of the RDBO::...::Auto methods return
RDBO::Metadata::* objects.  To move those to Rose::DB, I'd need to
come up with some sort of interchange format for the data (unless I
wanted to make Rose::DB::Object a prerequisite for Rose::DB, which I
don't :)  Anyway, Rose::DB contains the table listing stuff since
there's no interchange issues there (it's just a list of table names),
but everything else is still in RDBO.

-John

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

Reply via email to