Reinier Olislagers 11 tahun lalu
induk
melakukan
190324ac4d
6 mengubah file dengan 16 tambahan dan 11 penghapusan
  1. 3 3
      comparison.pas
  2. 2 2
      edittable.pas
  3. 1 1
      main.pas
  4. 1 1
      newtable.pas
  5. 5 1
      querywindow.pas
  6. 4 3
      scriptdb.pas

+ 3 - 3
comparison.pas

@@ -319,8 +319,8 @@ var
   IsPrimary: Boolean;
   ConstraintName: string;
 begin
-  //todo: if posssible merge this with create object statements generated
-  // in scriptdb code
+  {todo: if posssible merge this with create object statements generated
+   in scriptdb code}
   InitializeQueryWindow;
   ScriptList:= TStringList.Create;
   FieldsList:= TStringList.Create;
@@ -1551,7 +1551,7 @@ begin
       Line:= Line + '(' + IntToStr(DomainSize) + ')';
     fQueryWindow.meQuery.Lines.Add(Line);
 
-    // todo: verify if this is correct
+    // todo: verify if this collation clause works correctly
     if Trim(Collation) <> '' then
       FQueryWindow.meQuery.Lines.Add('collation '+Trim(Collation));
 

+ 2 - 2
edittable.pas

@@ -77,8 +77,8 @@ end;
 
 procedure TfmEditTable.DBGrid1TitleClick(Column: TColumn);
 begin
-  //todo: implement sorting a la
-  //http://wiki.lazarus.freepascal.org/Grids_Reference_Page#Sorting_columns_or_rows_in_DBGrid_with_sort_arrows_in_column_header
+  {todo: implement sorting a la
+  http://wiki.lazarus.freepascal.org/Grids_Reference_Page#Sorting_columns_or_rows_in_DBGrid_with_sort_arrows_in_column_header}
 { if sqEditTable.IndexFieldNames = Column.Field.FieldName then
    sqEditTable.IndexFieldNames := Column.Field.FieldName //+ 'DESC'
  else

+ 1 - 1
main.pas

@@ -2403,7 +2403,7 @@ begin
       (Pos('CSTRING', DomainType) >0) then
       DomainType:= DomainType + '(' + IntToStr(DomainSize) + ')';
 
-    //todo: how to present character set/collation
+    //todo: how to present character set/collation?
     // Fill ViewDomain form
     with ADomainForm do
     begin

+ 1 - 1
newtable.pas

@@ -280,7 +280,7 @@ begin
       List.Text:= GenerateCreateSQL(KeyField, GeneratorName);
       if cxCreateGen.Checked then
       begin;
-        //todo: move this to a utility function somewhere
+        //todo: move this generator/trigger creation to a utility function somewhere
         List.Add('');
         List.Add('-- Generator');
         List.Add('create generator ' + GeneratorName + ';');

+ 5 - 1
querywindow.pas

@@ -1450,7 +1450,11 @@ parameters
     try
       ATab.ImageIndex:= 2;
       SQLScript.Script.Text:= Script;
-      //todo: perhaps replace #10 with LineEnding?
+      {todo: when generating SQL, instead of generating #10 for line endings,
+       use  ASCII 23, ETB/End of Transmit Block
+       when displaying/using, replace ASCII 23 with End Of Line. Gives
+       better error messages on Windows where otherwise we'd have huge lines
+      }
       SQLScript.ExecuteScript;
 
       // Auto commit

+ 4 - 3
scriptdb.pas

@@ -47,7 +47,8 @@ implementation
 uses SysTables, Main;
 
 // Tries to guess if a constraint name is system-generated.
-// todo: find a way to search the system tables and make sure.
+{ todo: find a way to search the system tables and make sure the constraint name
+is system-generated}
 function SystemGeneratedConstraint(ConstraintName: string): boolean;
 begin
   result:=(pos('INTEG_',uppercase(Trim(ConstraintName)))=1);
@@ -218,8 +219,8 @@ begin
           FieldLine:= FieldLine + '(' + FieldByName('CharacterLength').AsString + ') ';
 
         // Rudimentary support for array datatypes (only covers 0 dimension types):
-        // todo: expand to proper array type detection (low priority as arrays are
-        // virtually unused)
+        {todo: expand to proper array type detection (low priority as arrays are
+         virtually unused}
         if not(FieldByName('Array_Upper_Bound').IsNull) then
           FieldLine:= FieldLine + ' [' + FieldByName('Array_Upper_Bound').AsString + '] ';