Re: Postgres Pain Points 2 ruby / node language drivers - Mailing list pgsql-general

From Karsten Hilbert
Subject Re: Postgres Pain Points 2 ruby / node language drivers
Date
Msg-id 20160814103530.GA4280@hermes.hilbert.loc
Whole thread Raw
In response to Re: Postgres Pain Points 2 ruby / node language drivers  (Chris Travers <chris.travers@gmail.com>)
Responses Re: Postgres Pain Points 2 ruby / node language drivers  (Chris Travers <chris.travers@gmail.com>)
List pgsql-general
On Fri, Aug 12, 2016 at 01:32:33PM +0200, Chris Travers wrote:

>>> My preference is stored procedures plus service locators
>>
>> Would you care to elaborate a little on the latter (service locators) ?
>>
>
> Sure.  What I prefer to do is to allow for a (cacheable) lookup on the
> basis of some criteria, either:
> 1.  Function name or
> 2.  Function name and first argument type
>
> This assumes that whichever discovery criteria you are using leads to
> uniquely identifying a function.
>
> Then from the argument list, I know the names and types of the arguments,
> and the service locator can map them in.  This means:
>
> 1.  You can expose an API which calls arguments by name rather than just
> position, and
> 2.  You can add arguments of different types without breaking things as
> long as it is agreed that unknown arguments are passed in as NULL.

Maybe I am a bit dense. Can you please give an example ?

Thanks,
Karsten
--
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


pgsql-general by date:

Previous
From: Xtra Coder
Date:
Subject: Re: Any reasons for 'DO' statement not returning result?
Next
From: Chris Travers
Date:
Subject: Re: Postgres Pain Points 2 ruby / node language drivers