Explorar el Código

fixed get sp args

develop
Robin Thoni hace 8 años
padre
commit
9cde0b665b
Se han modificado 2 ficheros con 4 adiciones y 2 borrados
  1. 2
    1
      src/Utils/DataAccess/PgSqlDataAccess.php
  2. 2
    1
      tests/DatabaseTest.php

+ 2
- 1
src/Utils/DataAccess/PgSqlDataAccess.php Ver fichero

@@ -234,7 +234,7 @@ WHERE r.specific_schema='public'");
234 234
      */
235 235
     public function getStoredProceduresArguments($pdo, $sp)
236 236
     {
237
-        $sp_name = $sp["sp_name"];
237
+        $sp_name = $sp["sp"]["sp_name"];
238 238
         $spQuery = $pdo->prepare("SELECT parameters.parameter_name as name, parameters.data_type, parameters.parameter_mode
239 239
 FROM information_schema.routines
240 240
 JOIN information_schema.parameters ON routines.specific_name=parameters.specific_name
@@ -243,6 +243,7 @@ ORDER BY parameters.ordinal_position;");
243 243
         if ($spQuery->execute(array("sp_name" => $sp_name)))
244 244
         {
245 245
             $sp_ = $spQuery->fetchAll();
246
+            var_dump($sp_);
246 247
             $sps = array("in" => array(), "out" => array());
247 248
             foreach ($sp_ as $p)
248 249
                 $sps[strtolower($p["parameter_mode"])][] = $p;

+ 2
- 1
tests/DatabaseTest.php Ver fichero

@@ -169,6 +169,7 @@ class DatabaseTest extends \PHPUnit_Framework_TestCase
169 169
 
170 170
         $pdo = TestTableDataAccess::getPdo();
171 171
         $pgsql = new PgSqlDataAccess();
172
-        var_dump($pgsql->getStoredProceduresFull($pdo));
172
+        $pgsql->getStoredProceduresFull($pdo);
173
+//        var_dump($pgsql->getStoredProceduresFull($pdo));
173 174
     }
174 175
 }

Loading…
Cancelar
Guardar