@@ -312,7 +312,7 @@ type TableColumn struct {
312
312
}
313
313
314
314
func (tc * TableColumn ) GetFullTypeName () string {
315
- return utils .GetObjectName (tc .TypeSchema , tc .TypeName )
315
+ return utils .BuildObjectName (tc .TypeSchema , tc .TypeName )
316
316
}
317
317
318
318
type TableConstraint struct {
@@ -346,7 +346,7 @@ func (c *TableConstraint) generateConstraintName(tableName string) string {
346
346
}
347
347
348
348
func (t * Table ) GetObjectName () string {
349
- return utils .GetObjectName (t .SchemaName , t .TableName )
349
+ return utils .BuildObjectName (t .SchemaName , t .TableName )
350
350
}
351
351
func (t * Table ) GetSchemaName () string { return t .SchemaName }
352
352
@@ -381,7 +381,7 @@ func (t *Table) addConstraint(conType pg_query.ConstrType, columns []string, spe
381
381
conName := lo .Ternary (specifiedConName == "" , generatedConName , specifiedConName )
382
382
tc .ConstraintName = conName
383
383
if conType == FOREIGN_CONSTR_TYPE {
384
- tc .ReferencedTable = utils .GetObjectName (referencedTable .Schemaname , referencedTable .Relname )
384
+ tc .ReferencedTable = utils .BuildObjectName (referencedTable .Schemaname , referencedTable .Relname )
385
385
}
386
386
t .Constraints = append (t .Constraints , tc )
387
387
}
@@ -433,7 +433,7 @@ type ForeignTable struct {
433
433
}
434
434
435
435
func (f * ForeignTable ) GetObjectName () string {
436
- return utils .GetObjectName (f .SchemaName , f .TableName )
436
+ return utils .BuildObjectName (f .SchemaName , f .TableName )
437
437
}
438
438
func (f * ForeignTable ) GetSchemaName () string { return f .SchemaName }
439
439
@@ -524,7 +524,7 @@ type IndexParam struct {
524
524
}
525
525
526
526
func (indexParam * IndexParam ) GetFullExprCastTypeName () string {
527
- return utils .GetObjectName (indexParam .ExprCastTypeSchema , indexParam .ExprCastTypeName )
527
+ return utils .BuildObjectName (indexParam .ExprCastTypeSchema , indexParam .ExprCastTypeName )
528
528
}
529
529
530
530
func (i * Index ) GetObjectName () string {
@@ -533,7 +533,7 @@ func (i *Index) GetObjectName() string {
533
533
func (i * Index ) GetSchemaName () string { return i .SchemaName }
534
534
535
535
func (i * Index ) GetTableName () string {
536
- return utils .GetObjectName (i .SchemaName , i .TableName )
536
+ return utils .BuildObjectName (i .SchemaName , i .TableName )
537
537
}
538
538
539
539
func (i * Index ) GetObjectType () string { return INDEX_OBJECT_TYPE }
@@ -611,7 +611,7 @@ func (atProcessor *AlterTableProcessor) Process(parseTree *pg_query.ParseResult)
611
611
In case of FKs the reference table is in PKTable field and columns are in FkAttrs
612
612
*/
613
613
alter .ConstraintColumns = parseColumnsFromKeys (constraint .FkAttrs )
614
- alter .ConstraintReferencedTable = utils .GetObjectName (constraint .Pktable .Schemaname , constraint .Pktable .Relname )
614
+ alter .ConstraintReferencedTable = utils .BuildObjectName (constraint .Pktable .Schemaname , constraint .Pktable .Relname )
615
615
}
616
616
617
617
case pg_query .AlterTableType_AT_DisableRule :
@@ -651,7 +651,7 @@ type AlterTable struct {
651
651
}
652
652
653
653
func (a * AlterTable ) GetObjectName () string {
654
- return utils .GetObjectName (a .SchemaName , a .TableName )
654
+ return utils .BuildObjectName (a .SchemaName , a .TableName )
655
655
}
656
656
func (a * AlterTable ) GetSchemaName () string { return a .SchemaName }
657
657
@@ -716,7 +716,7 @@ type Policy struct {
716
716
}
717
717
718
718
func (p * Policy ) GetObjectName () string {
719
- qualifiedTable := utils .GetObjectName (p .SchemaName , p .TableName )
719
+ qualifiedTable := utils .BuildObjectName (p .SchemaName , p .TableName )
720
720
return fmt .Sprintf ("%s ON %s" , p .PolicyName , qualifiedTable )
721
721
}
722
722
func (p * Policy ) GetSchemaName () string { return p .SchemaName }
@@ -792,7 +792,7 @@ func (t *Trigger) GetObjectName() string {
792
792
}
793
793
794
794
func (t * Trigger ) GetTableName () string {
795
- return utils .GetObjectName (t .SchemaName , t .TableName )
795
+ return utils .BuildObjectName (t .SchemaName , t .TableName )
796
796
}
797
797
798
798
func (t * Trigger ) GetSchemaName () string { return t .SchemaName }
@@ -869,7 +869,7 @@ type CreateType struct {
869
869
}
870
870
871
871
func (c * CreateType ) GetObjectName () string {
872
- return utils .GetObjectName (c .SchemaName , c .TypeName )
872
+ return utils .BuildObjectName (c .SchemaName , c .TypeName )
873
873
}
874
874
func (c * CreateType ) GetSchemaName () string { return c .SchemaName }
875
875
@@ -891,7 +891,7 @@ func (v *ViewProcessor) Process(parseTree *pg_query.ParseResult) (DDLObject, err
891
891
892
892
viewSchemaName := viewNode .ViewStmt .View .Schemaname
893
893
viewName := viewNode .ViewStmt .View .Relname
894
- qualifiedViewName := utils .GetObjectName (viewSchemaName , viewName )
894
+ qualifiedViewName := utils .BuildObjectName (viewSchemaName , viewName )
895
895
896
896
/*
897
897
view_stmt:{view:{schemaname:"public" relname:"invoker_view" inh:true relpersistence:"p" location:12}
@@ -924,7 +924,7 @@ type View struct {
924
924
}
925
925
926
926
func (v * View ) GetObjectName () string {
927
- return utils .GetObjectName (v .SchemaName , v .ViewName )
927
+ return utils .BuildObjectName (v .SchemaName , v .ViewName )
928
928
}
929
929
func (v * View ) GetSchemaName () string { return v .SchemaName }
930
930
@@ -956,7 +956,7 @@ type MView struct {
956
956
}
957
957
958
958
func (mv * MView ) GetObjectName () string {
959
- return utils .GetObjectName (mv .SchemaName , mv .ViewName )
959
+ return utils .BuildObjectName (mv .SchemaName , mv .ViewName )
960
960
}
961
961
func (mv * MView ) GetSchemaName () string { return mv .SchemaName }
962
962
0 commit comments