I've got such a method:
from app.database import db
def get_channels_list(user_token):
data = jwt.decode(user_token, app.config.get('JWT_SECRET'))
connection = db.engine.raw_connection()
try:
cursor = connection.cursor()
cursor.callproc("permission_list_user", [958539, 'web'])
results = list(cursor.fetchall())
cursor.close()
connection.commit()
finally:
connection.close()
print(len(results))
return success(results)
And when I run it I get len(results) == 0
but when I run the same procedure via mysql console like that:
CALL permission_list_user(958539, 'web');
I get results it should return.