[DBIx-Class-Devel] [dbsrgits/dbix-class-schema-loader] add the `-o omit_view_definitions=1` option to remove the view definitions from server side views (#14)

Dagfinn Ilmari Mannsåker notifications at github.com
Sun Apr 12 14:48:14 GMT 2020


@ilmari commented on this pull request.



> @@ -2626,8 +2631,8 @@ sub _setup_src_meta {
     $self->_dbic_stmt($table_class, 'table', $table->dbic_name);
 
     # Must come after ->table
-    if ($is_view and my $view_def = $self->_view_definition($table)) {
-        $self->_dbic_stmt($table_class, 'result_source_instance->view_definition', $view_def);
+    if (  $is_view and my $view_def = $self->_view_definition( $table ) and not $self->omit_view_definitions ){

There's no point in getting the view definition if we're not going to emit it, so please move the check before the `->_view_definition` call. Also, please refrain from unrelated whitespace changes.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/dbix-class-schema-loader/pull/14#pullrequestreview-391864893
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/dbix-class-devel/attachments/20200412/b216f8ad/attachment.htm>


More information about the DBIx-Class-Devel mailing list