Skip to content

how to return the table type to python #252

Closed Answered by anthony-tuininga
ptekelly asked this question in Q&A
Discussion options

You must be logged in to vote

It would be helpful if you showed the definition of the procedure. I assume, however, that the second parameter is an OUT parameter of type GUILD_USERS_DATA_TBL. If so, something like this should get you going:

typ = connection.gettype("GUILD_USERS_DATA_TBL")
user_tab = cur.var(typ)
cur.callproc("GET_GUILD_USERS_DATA", [guild_id, user_tab])
obj = user_tab.getvalue()
for user in obj.aslist():
    print("my_id:", user.MY_ID)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ptekelly
Comment options

Answer selected by cjbj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants