[Dbix-class] View Definitions for non-virtual views

Thomas Sibley trsibley at uw.edu
Fri Jul 21 19:35:27 GMT 2017


On Jul 21, 2017, at 12:32 , Matt S Trout <mst at shadowcat.co.uk> wrote:
> 
> On Fri, Jul 21, 2017 at 10:51:15AM -0700, Thomas Sibley wrote:
>> I noticed this too, a while back, and wondered about it.  I believe the reason is that for folks who want to dump a database in order to start using DBIx::Class’s deployment tools, the authoritative view definition needs to start living in the .pm file.  For folks, like myself, who manage the database itself and use dbicdump just to sync the .pm files with it, the view’s underlying query is useless in the .pm.  I agree an option would be nice.
> 
> It's kinda handy being able to see it in the files, too - the .pm files
> are effectively documentation of the schema the code expects as well as
> structural.

Hmm, though the other parts of the generated file (columns, constraints, etc) take care of that too.  The full defining query of the view is, to me, more of the implementation details and semantics of the resulting schema.


More information about the DBIx-Class mailing list