httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Galić <>
Subject Re: [Discuss] mod_lua and database connectivity
Date Sat, 05 Jan 2013 09:49:38 GMT

> Implied semantics matter a LOT in API design.

> > 
> > Check your errors :-)
> I don't need to check errors, I just need to check whether 'rows' is
> a
> table or a nil value in the case of an error. I could've checked if
> 'err' was anything, but the result is the same.
> An API which returns (foo, err) should be error checked on the error,
> not the foo. This style of API will sometimes return a foo in a bad
> state, and an err to let you know. In your example this is fine, I
> am just being a pedant because if an API is designed a certain way,
> we should use it that way :-)

My take away is that we want mod_dbd bindings in mod_lua, but we
want the API to be more carefully crafted.


Igor Galić

Tel: +43 (0) 664 886 22 883
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE

View raw message