MySQL Forums
Forum List  »  Stored Procedures

Re: Stored procedures utility library
Posted by: Jay Pipes
Date: November 23, 2005 11:24AM

Hey, I'm in. Some thoughts:

1) I also believe that a custom application would need to be written to moderate the namespace and dependency issues outlined above. I think that Python is an ideal language for writing the installer, but that's my personal preference; I'd be happy to work on anything.
2) I think the Wiki is a great idea for the documentation part of things.
3) Regarding the problem of having to be explicit about the calls to general stored procedures intended to run on any database, I tend to side with Roland. As long as you're clear in the documentation and examples that *this is how one should call this procedure*, I think you're going to be OK; that is, until MySQL develops further functionality to address this issue.
4) Regarding the COMMENTS issue, I believe that this is best left to the version control system used to moderate the development and versioning of the various procedures. Subversion, Monotone, and git all have the ability to add comments to source code. Since all stored procedures are is source code, I vote to leave comments for the version control system and leave the stored procedure COMMENTS clause for the *version of the stored procedure only*. That way, we can deal with the 64 character current limitation and actually use the COMMENTS field within the installer to verify installation and dependencies.
5) Regarding stylistic guidelines, I have my own set of stylistic things, as I'm sure everyone else does. The important thing is to simply settle on a style and be consistent about it. we can use a Wiki to hash out the settled-on style, no?
6) I believe a single utility database named after the project would be the best choice. Names for procedures could be "quasi-namespaced" with the category and then the procedure name as an action. For instance, let's assume the project name is called "MySQL Stored Routine Repository" (I know, blah, but just an example). And assume a couple sample categories named "String Manipulation" and "Crosstab Generation". A naming guideline for the mythical mysql_srr database might be:

mysql_srr.str_man_get_string_from_row()
mysql_srr.str_man_put_row_from_string()
mysql_srr.crosstab_make_crosstab_from_fields()

and so on... I used underscores here, but I'd be just as happy using camel or Pascal casing. As long as the category name was evident as a grouping mechanism for procedures...

First things to start on I guess would be getting the Wiki up and running and starting a discussion on the style issue, and getting a preliminary list of categories together with which to group procedures. Let me know how I can help...

Great ideas, guys!

Jay Pipes
Community Relations Manager, North America, MySQL Inc.

Got Cluster? http://www.mysql.com/cluster
Personal: http://jpipes.com

Options: ReplyQuote


Subject
Views
Written By
Posted
5903
November 21, 2005 03:41AM
2774
November 21, 2005 04:39AM
2514
November 21, 2005 05:13AM
2676
November 21, 2005 08:00AM
2829
November 21, 2005 06:53AM
2740
November 21, 2005 08:06AM
2541
November 21, 2005 08:32AM
Re: Stored procedures utility library
7920
November 23, 2005 11:24AM
2658
December 03, 2005 08:37AM
2533
November 28, 2005 02:26AM
2630
November 29, 2005 04:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.