View Issue Details

IDProjectCategoryView StatusLast Update
0032898FPCDatabasepublic2017-12-29 15:39
ReporterDaniel GasparyAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version3.1.1Product Build3.1.1 [2017/12/25] for x86_64 
Target Version3.2.0Fixed in Version3.1.1 
Summary0032898: Datadictionary - Function to show the complete name of a TSqlObjectIdentifier
DescriptionThe Function show the name of a TSqlObjectIdentifier using the SchemaName when the object has one.
Additional InformationRelated to bug 0029782
TagsNo tags attached.
Fixed in Revision37855
FPCOldBugId
FPCTarget
Attached Files
  • sqltypes-TSqlObjectIdenfier_FullName.patch (1,239 bytes)
    Index: sqltypes.pp
    ===================================================================
    --- sqltypes.pp	(revision 37846)
    +++ sqltypes.pp	(working copy)
    @@ -28,6 +28,7 @@
         FSchemaName: String;
       public
         constructor Create(ACollection: TSqlObjectIdentifierList; Const AObjectName: String; Const ASchemaName: String = '');
    +    function FullName: String;
         property SchemaName: String read FSchemaName write FSchemaName;
         property ObjectName: String read FObjectName write FObjectName;
       end;
    @@ -50,7 +51,7 @@
     { TSqlObjectIdenfier }
     
     constructor TSqlObjectIdenfier.Create(ACollection: TSqlObjectIdentifierList;
    -  const AObjectName: String; Const ASchemaName: String = '');
    +  const AObjectName: String; const ASchemaName: String);
     begin
       inherited Create(ACollection);
       FSchemaName:=ASchemaName;
    @@ -57,6 +58,15 @@
       FObjectName:=AObjectName;
     end;
     
    +function TSqlObjectIdenfier.FullName: String;
    +begin
    +     Result:=FObjectName;
    +
    +     if FSchemaName<>''
    +     then
    +         Result:=FSchemaName + '.' + FObjectName;
    +end;
    +
     { TSqlObjectIdentifierList }
     
     function TSqlObjectIdentifierList.GetIdentifier(Index: integer): TSqlObjectIdenfier;
    @@ -83,4 +93,4 @@
     end;
     
     
    -end.
    \ No newline at end of file
    +end.
    

Activities

Daniel Gaspary

2017-12-28 19:35

reporter  

sqltypes-TSqlObjectIdenfier_FullName.patch (1,239 bytes)
Index: sqltypes.pp
===================================================================
--- sqltypes.pp	(revision 37846)
+++ sqltypes.pp	(working copy)
@@ -28,6 +28,7 @@
     FSchemaName: String;
   public
     constructor Create(ACollection: TSqlObjectIdentifierList; Const AObjectName: String; Const ASchemaName: String = '');
+    function FullName: String;
     property SchemaName: String read FSchemaName write FSchemaName;
     property ObjectName: String read FObjectName write FObjectName;
   end;
@@ -50,7 +51,7 @@
 { TSqlObjectIdenfier }
 
 constructor TSqlObjectIdenfier.Create(ACollection: TSqlObjectIdentifierList;
-  const AObjectName: String; Const ASchemaName: String = '');
+  const AObjectName: String; const ASchemaName: String);
 begin
   inherited Create(ACollection);
   FSchemaName:=ASchemaName;
@@ -57,6 +58,15 @@
   FObjectName:=AObjectName;
 end;
 
+function TSqlObjectIdenfier.FullName: String;
+begin
+     Result:=FObjectName;
+
+     if FSchemaName<>''
+     then
+         Result:=FSchemaName + '.' + FObjectName;
+end;
+
 { TSqlObjectIdentifierList }
 
 function TSqlObjectIdentifierList.GetIdentifier(Index: integer): TSqlObjectIdenfier;
@@ -83,4 +93,4 @@
 end;
 
 
-end.
\ No newline at end of file
+end.

Michael Van Canneyt

2017-12-29 11:49

administrator   ~0105098

Applied the patch, thanks for the contribution !

Daniel Gaspary

2017-12-29 15:39

reporter   ~0105114

Thank you.

Issue History

Date Modified Username Field Change
2017-12-28 19:35 Daniel Gaspary New Issue
2017-12-28 19:35 Daniel Gaspary File Added: sqltypes-TSqlObjectIdenfier_FullName.patch
2017-12-29 11:40 Michael Van Canneyt Assigned To => Michael Van Canneyt
2017-12-29 11:40 Michael Van Canneyt Status new => assigned
2017-12-29 11:49 Michael Van Canneyt Fixed in Revision => 37855
2017-12-29 11:49 Michael Van Canneyt Note Added: 0105098
2017-12-29 11:49 Michael Van Canneyt Status assigned => resolved
2017-12-29 11:49 Michael Van Canneyt Fixed in Version => 3.1.1
2017-12-29 11:49 Michael Van Canneyt Resolution open => fixed
2017-12-29 11:49 Michael Van Canneyt Target Version => 3.2.0
2017-12-29 15:39 Daniel Gaspary Note Added: 0105114
2017-12-29 15:39 Daniel Gaspary Status resolved => closed