On Wed, Oct 22, 2014 at 12:35 PM, Carl Meyer <[email protected]> wrote:

> Here is where we differ. I think calling a database stored procedure is
> fundamentally a different thing from calling a Python function (even one
> that accesses the database), and the difference should be obvious in the
> calling code. I don't think it is good API design to abstract away
> differences that the caller should be aware of. (For one example of a
> difference, database stored procedures "return a modified copy of the
> input arguments", which would be extremely unusual behavior for a normal
> Python function.)
>
> I think this is mostly a question of level. In an actual Django app that
> uses stored procedures, I think it is quite likely a good idea for the
> author of the app to provide a nice Python API that abstracts away the
> internal implementation. But I think this API should be consciously
> designed for-purpose (for example, it should likely return something
> other than a possibly-modified copy of all its input arguments), and at
> the level of Django core the benefits of a generic API that attempts to
> mask the difference between Python functions and database stored
> procedures are not enough to justify the magic required.
>
> Perhaps I'm wrong - but I'd definitely want to see the utility of such a
> generic "magic" layer proved as an external library before it gets added
> to core.
>

As someone who has used a very large number of stored procedures with
Django, I am a solid -1 on adding a generic "magic" layer to Django. Stored
procedures are purpose built. Their python usage should also be purpose
built to match the various combinations of input/output parameters, return
values, and result sets that are possible for a stored procedure.

Regards,
Michael Manfre

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAGdCwBsDgj2S9W%3DVE9VXy-3U4uBQtgkhKetqbbyEMzWbYzqqTg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to