File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,14 @@ export const apply = ({
2424 return py_class_and_methods
2525 } )
2626 const composite_types = types
27- . filter ( ( type ) => type . attributes . length > 0 )
27+ . filter ( ( type ) => type . attributes . length > 0 && schemas . some ( ( schema ) => type . schema == schema . name ) )
2828 . map ( ( type ) => ctx . typeToClass ( type ) )
29- const py_views = views . map ( ( view ) => ctx . viewToClass ( view ) )
30- const py_matviews = materializedViews . map ( ( matview ) => ctx . matViewToClass ( matview ) )
29+ const py_views = views
30+ . filter ( ( view ) => schemas . some ( ( schema ) => schema . name === view . schema ) )
31+ . map ( ( view ) => ctx . viewToClass ( view ) )
32+ const py_matviews = materializedViews
33+ . filter ( ( matview ) => schemas . some ( ( schema ) => schema . name === matview . schema ) )
34+ . map ( ( matview ) => ctx . matViewToClass ( matview ) )
3135
3236 let output = `
3337from __future__ import annotations
You can’t perform that action at this time.
0 commit comments