Codebase list python-cx-oracle / 960b1fa2-91a8-411d-b7e1-dd410ad82902/upstream samples / tutorial / plsql_func.py
960b1fa2-91a8-411d-b7e1-dd410ad82902/upstream

Tree @960b1fa2-91a8-411d-b7e1-dd410ad82902/upstream (Download .tar.gz)

plsql_func.py @960b1fa2-91a8-411d-b7e1-dd410ad82902/upstreamraw · history · blame

#------------------------------------------------------------------------------
# plsql_func.py (Section 5.1)
#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
#------------------------------------------------------------------------------

import cx_Oracle
import db_config

con = cx_Oracle.connect(db_config.user, db_config.pw, db_config.dsn)
cur = con.cursor()

res = cur.callfunc('myfunc', int, ('abc', 2))
print(res)