[Gllug] Introductions to Databases
Richard Jones
rich at annexia.org
Mon Jul 20 17:48:31 UTC 2009
On Mon, Jul 20, 2009 at 01:55:45PM +0100, Peter Corlett wrote:
> On Sun, Jul 19, 2009 at 11:49:24AM +0100, Richard Jones wrote:
> [...]
> > There's another subtlety about this code which I forgot to mention. At
> > compile time it checks the types of the columns against the database
> > schema. So for example you'd get a compile time error if the name variable
> > wasn't a string. Or if your DBA drops the email column without telling
> > anyone, then again you'd get a clear compile-time error.
>
> I'd like to see it raise a compile-time error if the DBA dropped it *after*
> compilation. You're still going to end up with a run-time error, so what
> have you actually gained?
This is not an alternative for having proper change control on your
database. You get a runtime error where the schema has changed after
compilation.
What you gain is that all the error / rarely used paths in your code
are checked at compile time, rather than having them blow up in front
of a customer who hits some rare case that you never tested.
Rich.
--
Richard Jones
Red Hat
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list