There's more than one way to do things | |
PerlMonks |
Re^4: Mapping database errors to user errorsby Aristotle (Chancellor) |
on Nov 27, 2005 at 18:26 UTC ( [id://512036]=note: print w/replies, xml ) | Need Help?? |
I think what’s really necessary is basically for things that talk SQL to acknowledge that they’re not a world of their own; syntactic support for constraint annotation should be available in SQL so it can be done right in the schema. As well, details for errors raised should be available as structured data. Then something vaguely like Data::FormValidator could be built around this. I’m not quite sure of the line where the concerns would be split between database and client code, though. Absent of direct support in SQL, a lot of this might still be achievable with some sort of SQL preprocessor and a wrapper layer over the database, although the at least the wrapper will probably have to be rewritten for each RDBMS. A great many details need to be thought through, and so far all I have is vague intuitions and ill-defined gut feeling. Maybe all I wrote above is wrong. The scope of the problem is staggering; I don’t believe I can surmount it on my own. But no one seems to have a particularly avid interest. I am disheartened to find how little work has been done in this area, generally. We’ve been using RDBMS for how long, now? The sorry state of error reporting in that field is actually known well enough. Surely, that would have gotten notice so far. But no, everyone just seems to scrape by with kludges and minimal solutions. I really don’t understand this. Nevertheless, a sketch of what it all should work like seems feasible, so I occasionally spend time scribbling and mulling. Makeshifts last the longest.
In Section
Seekers of Perl Wisdom
|
|