Tomasz Rybak, in reply to the stored procedures entry says:
I've written such tool, and you can download it here: http://kwi.pb.bialystok.pl/~bogomips/autostoredprocedures-0.0.1.tar.gz. For now, it supports only PostgreSQL.Short description:
- Written using MonoDevelop - so Makefile is generated by MD.
- I changed name of namespace and class from AutoSproc to AutoStoredProcedures, so these tools could be used at the same time.
- I haven't found DBProvider in Mono, so there are only two methods CreateInstance, both taking IDbConnection.
- All fields and methods are static.
- There is no possibility of saving generated module (but if one adds abiulder.Save(asseblyname) in CreateInstance, it saves dll) nor caching generated modules.
- I haven't tested it much, and haven't written test suite.
- I added StoredParameterNameAttribute, so one can change name of parameter given to stored procedure.
- Entire code is generated. AutoSproc has four worker methods ExecuteStoredProc*, but in my code no method are called from outside generated class.
- I think (but I'm not sure) that adding support to other databases will be simple: add CreateClassDATABASE and CreateMethodDATABASE, copy body of methods from Create*Npgsql, changing types from Npgsql* to other, and it should work - but I haven;t tested it.