add operators to the find feature
authorchriskl <chriskl>
Wed, 27 Aug 2003 08:09:26 +0000 (08:09 +0000)
committerchriskl <chriskl>
Wed, 27 Aug 2003 08:09:26 +0000 (08:09 +0000)
classes/database/Postgres73.php
database.php

index b2a2d7414973f1285d6e468c049ad3420eef7684..52be45ebb6119c21ec58e36c08ae304edf30a243 100644 (file)
@@ -4,7 +4,7 @@
  * A class that implements the DB interface for Postgres
  * Note: This class uses ADODB and returns RecordSets.
  *
- * $Id: Postgres73.php,v 1.60 2003/08/26 05:59:49 chriskl Exp $
+ * $Id: Postgres73.php,v 1.61 2003/08/27 08:09:26 chriskl Exp $
  */
 
 // @@@ THOUGHT: What about inherits? ie. use of ONLY???
@@ -1034,6 +1034,9 @@ class Postgres73 extends Postgres72 {
                                WHERE pt.typnamespace=pn.oid AND typname ILIKE '%{$term}%'
                                AND (pt.typrelid = 0 OR (SELECT c.relkind = 'c' FROM pg_catalog.pg_class c WHERE c.oid = pt.typrelid))
                                {$where}
+                       UNION ALL
+                       SELECT 'OPERATOR', po.oid, pn.nspname, NULL, po.oprname FROM pg_catalog.pg_operator po, pg_catalog.pg_namespace pn 
+                               WHERE po.oprnamespace=pn.oid AND oprname ILIKE '%{$term}%' {$where}
                        ORDER BY type, schemaname, relname, name";
                        
                return $this->selectSet($sql);
index 2db165926e0e2e0ed6015dddf654147d4dccc78b..b59bbeb8f8a6caa63b6504ae206018b9d814f96c 100755 (executable)
@@ -3,7 +3,7 @@
        /**
         * Manage schemas within a database
         *
-        * $Id: database.php,v 1.17 2003/07/29 00:36:44 chriskl Exp $
+        * $Id: database.php,v 1.18 2003/08/27 08:09:27 chriskl Exp $
         */
 
        // Include application functions
@@ -69,6 +69,9 @@
                                                        case 'TYPE':
                                                                echo $lang['strtypes'];
                                                                break;
+                                                       case 'OPERATOR':
+                                                               echo $lang['stroperators'];
+                                                               break;
                                                }
                                                echo "</h2>";
                                                echo "<ul>\n";
                                                        echo "<li><a href=\"types.php?action=properties&{$misc->href}&schema=", urlencode($rs->f['schemaname']), "&type=", 
                                                                urlencode($rs->f['name']), "\">", $misc->printVal($rs->f['schemaname']), '.', _highlight($misc->printVal($rs->f['name']), $_GET['term']), "</a></li>\n";
                                                        break;
+                                               case 'OPERATOR':
+                                                       echo "<li><a href=\"operators.php?{$misc->href}&schema=", urlencode($rs->f['schemaname']), "&operator=", 
+                                                               urlencode($rs->f['name']), "\">", $misc->printVal($rs->f['schemaname']), '.', _highlight($misc->printVal($rs->f['name']), $_GET['term']), "</a></li>\n";
+                                                       break;
                                        }
                                        $rs->moveNext();        
                                }