[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Self-documenting API Proposal



On 1/29/07, Jeff Kowalczyk <..hidden..> wrote:
--- Chris Travers <..hidden..> wrote:
> After thinking a great deal about Josh Berkus's suggestion that we use
> a text file with some sort of self-documenting API capabilities.

Did that mean the documentation of the 90% stored procedure API, or the
automation API of the 10% layer in perl?

Right.  PostgreSQL stored procedure layer.

Is there a thread title or direct link for Josh's suggestion? I'd like to read
it.

http://sourceforge.net/mailarchive/message.php?msg_id=38053583

He was talking about an approach to ORM.  I am essentially talking
about the same thing but encapsulating it in the db where it can be
app-independant.

> general, I like this idea, but I was wondering if it was a good idea
> to store this in the database.

How are the introspection abilities of postgresql for stored procedures? If the
self-documenting tool could return the SP signature and a documentation string
or comment formatted by convention (akin to a python docstring), that would be
a big help for that part of the API.

I can get argument types out, but not argument names.  My approach is
to map component names to variables in the db so the application can
create the mappings.  This would allow self-documenting db api's to be
consumed by the perl layer.