Browse Source

* Added check for descending index

git-svn-id: trunk@8062 -
michael 18 years ago
parent
commit
71152163bc
1 changed files with 3 additions and 1 deletions
  1. 3 1
      packages/fcl-db/src/sqldb/interbase/ibconnection.pp

+ 3 - 1
packages/fcl-db/src/sqldb/interbase/ibconnection.pp

@@ -995,7 +995,8 @@ begin
               'ind.rdb$relation_name, '+
               'ind.rdb$relation_name, '+
               'ind.rdb$unique_flag, '+
               'ind.rdb$unique_flag, '+
               'ind_seg.rdb$field_name, '+
               'ind_seg.rdb$field_name, '+
-              'rel_con.rdb$constraint_type '+
+              'rel_con.rdb$constraint_type, '+
+              'ind.rdb$index_type '+
             'from '+
             'from '+
               'rdb$index_segments ind_seg, '+
               'rdb$index_segments ind_seg, '+
               'rdb$indices ind '+
               'rdb$indices ind '+
@@ -1017,6 +1018,7 @@ begin
     Fields := trim(qry.Fields[3].asstring);
     Fields := trim(qry.Fields[3].asstring);
     If qry.fields[4].asstring = 'PRIMARY KEY' then options := options + [ixPrimary];
     If qry.fields[4].asstring = 'PRIMARY KEY' then options := options + [ixPrimary];
     If qry.fields[2].asinteger = 1 then options := options + [ixUnique];
     If qry.fields[2].asinteger = 1 then options := options + [ixUnique];
+    If qry.fields[5].asInteger = 1 then options:=options+[ixDescending];
     qry.next;
     qry.next;
     while (name = trim(qry.fields[0].asstring)) and (not qry.eof) do
     while (name = trim(qry.fields[0].asstring)) and (not qry.eof) do
       begin
       begin