File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed
Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -35,16 +35,19 @@ internal override object Clone(SqlNodeCloneContext context)
3535 return context . NodeMapping [ this ] ;
3636 }
3737
38- {
39- var clone = new SqlTableRef { Name = Name , DataTable = DataTable } ;
40- context . NodeMapping [ this ] = clone ;
41- var columnClones = new List < SqlTableColumn > ( columns . Count ) ;
42- columnClones . AddRange ( columns . Select ( column => ( SqlTableColumn ) column . Clone ( context ) ) ) ;
38+ return CreateClone ( context ) ;
39+ }
40+
41+ private SqlTableRef CreateClone ( SqlNodeCloneContext context )
42+ {
43+ var clone = new SqlTableRef { Name = Name , DataTable = DataTable } ;
44+ context . NodeMapping [ this ] = clone ;
45+ var columnClones = new List < SqlTableColumn > ( columns . Count ) ;
46+ columnClones . AddRange ( columns . Select ( column => ( SqlTableColumn ) column . Clone ( context ) ) ) ;
4347
44- clone . columns = new SqlTableColumnCollection ( columnClones ) ;
48+ clone . columns = new SqlTableColumnCollection ( columnClones ) ;
4549
46- return clone ;
47- }
50+ return clone ;
4851 }
4952
5053 public override void AcceptVisitor ( ISqlVisitor visitor ) => visitor . Visit ( this ) ;
You can’t perform that action at this time.
0 commit comments