def test_out_params(self): result = \ config.db.execute(text('call foo(:x_in, :x_out, :y_out, ' ':z_out)', bindparams=[bindparam('x_in'), outparam('x_out'), outparam('y_out'), outparam('z_out')]), x_in=5, x_out=0, y_out=0, z_out='') eq_(result.out_parameters, {'x_out': 10, 'y_out': 75, 'z_out': None}) assert isinstance(result.out_parameters['x_out'], long)
def test_out_params(self): result = testing.db.execute(text('begin foo(:x_in, :x_out, :y_out, ' ':z_out); end;', bindparams=[bindparam('x_in', Float), outparam('x_out', Integer), outparam('y_out', Float), outparam('z_out', String)]), x_in=5) eq_(result.out_parameters, {'x_out': 10, 'y_out': 75, 'z_out': None}) assert isinstance(result.out_parameters['x_out'], int)
def test_out_params(self, connection): result = connection.execute( text("begin foo(:x_in, :x_out, :y_out, " ":z_out); end;").bindparams( bindparam("x_in", Float), outparam("x_out", Integer), outparam("y_out", Float), outparam("z_out", String), ), dict(x_in=5), ) eq_(result.out_parameters, {"x_out": 10, "y_out": 75, "z_out": None}) assert isinstance(result.out_parameters["x_out"], int)
def test_out_params(self): result = testing.db.execute( text( "begin foo(:x_in, :x_out, :y_out, " ":z_out); end;" ).bindparams( bindparam("x_in", Float), outparam("x_out", Integer), outparam("y_out", Float), outparam("z_out", String), ), x_in=5, ) eq_(result.out_parameters, {"x_out": 10, "y_out": 75, "z_out": None}) assert isinstance(result.out_parameters["x_out"], int)
def test_out_params(self): result = testing.db.execute( text( "begin foo(:x_in, :x_out, :y_out, " ":z_out); end;", bindparams=[ bindparam("x_in", Float), outparam("x_out", Integer), outparam("y_out", Float), outparam("z_out", String), ], ), x_in=5, ) eq_(result.out_parameters, {"x_out": 10, "y_out": 75, "z_out": None}) assert isinstance(result.out_parameters["x_out"], int)
def test_no_out_params_w_returning(self, connection, metadata): t = Table("t", metadata, Column("x", Integer), Column("y", Integer)) metadata.create_all(connection) stmt = (t.insert().values(x=5, y=10).returning( outparam("my_param", Integer), t.c.x)) with expect_raises_message( exc.InvalidRequestError, r"Using explicit outparam\(\) objects with " r"UpdateBase.returning\(\) in the same Core DML statement " "is not supported in the Oracle dialect.", ): connection.execute(stmt)