sp_outparams
This page is part of MariaDB's Enterprise Documentation.
The parent of this page is: Connector/Python API
Topics on this page:
Overview
Indicates if the current result set contains in out or out parameter from a previous executed stored procedure.
See also: MariaDB Connector/Python 1.1 and in 1.0
EXAMPLES
import mariadb
conn = mariadb.connect(
host = 'localhost',
user = 'root',
password = 'secret',
)
cursor = conn.cursor()
cursor.execute("""
CREATE PROCEDURE p1(IN i1 VARCHAR(20), OUT o2 VARCHAR(40))
BEGIN
SELECT 'hello';
SET o2 = 'test';
END
""")
cursor.callproc('p1', ('foo', 0))
print(cursor.sp_outparams) # Prints: False
print(cursor.fetchone()) # Prints: ('hello',)
cursor.nextset()
print(cursor.sp_outparams) # Prints: True
print(cursor.fetchone()) # Prints: ('test',)
cursor.execute("DROP PROCEDURE p1")
CHANGE HISTORY
Release Series | History |
---|---|
1.1 |
|
1.0 |
|