Database interface design - was how to build up the library.
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Oct 7 12:09:05 PDT 2011
On 10/7/11 1:27 PM, Steve Teale wrote:
> Andrei,
>
> So if I'm understanding you correctly, if structs are used, and there's a database
> change, then the app has to be rebuilt.
Yes. Touched to update the structs and rebuilt.
> If Variants, then only the app's config
> file has to be updated (or the app can look in the database to get such
> information) - have I got this right?
Yah. The exact behavior depends on the assumption the app makes about
the resultset. Consider:
auto result = db.sql(queryString);
enforce(result.front[0].type == typeid(double));
...
In this case you'd pretty much need to touch the code if the queryString
returns something else than a double in the first column.
Andrei
More information about the Digitalmars-d
mailing list