
If you were logged in you would be able to see more operations.
|
|
|
Issue Links:
|
Duplicate
|
This issue duplicates:
|
|
PYFB-51
<procedure>.get_sql_for('<re>create') returns invalid output parameters
|
|
|
|
|
|
|
|
In cases, where output parameters count is greater then 1, the Procedure.get_sql('create') method returns input parameter in place of output, , i.e.
instead of "create procedure proc (foo integer) returns (bar1 integer, bar2 integer)" it returns "create procedure proc (foo integer) returns (foo integer, )" (note extra comma in result)
|
Description
|
In cases, where output parameters count is greater then 1, the Procedure.get_sql('create') method returns input parameter in place of output, , i.e.
instead of "create procedure proc (foo integer) returns (bar1 integer, bar2 integer)" it returns "create procedure proc (foo integer) returns (foo integer, )" (note extra comma in result)
|
Show » |
|
diff --git a/fdb/schema.py b/fdb/schema.py
index 1299dc9..8126416 100644
--- a/fdb/schema.py
+++ b/fdb/schema.py
@@ -2849,7 +2849,7 @@ class Procedure(BaseSchemaItem):
result += 'RETURNS (%s)\n' % self.output_params[0].get_sql_definition()
else:
result += 'RETURNS (\n'
- for p in self.input_params:
+ for p in self.output_params:
result += ' %s%s\n' % (p.get_sql_definition(),
'' if p.sequence+1 == self._attributes['RDB$PROCEDURE_OUTPUTS']
else ',')