Is it possible to collect object usage information during compilation?

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 11 01:51:58 PST 2015


On 2015-01-10 21:53, DaveG wrote:

> One final note. You may have noticed I didn't mention the schema syncing
> problem (keeping database and code in sync). There was a time I would
> have said that was essential and while it would be nice in a perfect
> world, I'm comfortable keeping them in sync manually (or semi-manual
> with scripts). I can generate a bunch of classes from an existing
> database fairly easily and when I change a table I can manually update a
> class. If I was writing SQL directly I would have to update my query,
> this is really no different. Doing validation in unit tests is perfectly
> acceptable to me.

With D you can inspect all fields on a class/struct. Then you can create 
a migration tool that inspects your models and make sure the database match.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list