пытаюсь понять как переадть аргументы

main
Лев 2025-08-28 09:44:49 +05:00
parent 9fd58ee6c9
commit a96d8beb41
1 changed files with 8 additions and 12 deletions

View File

@ -64,25 +64,21 @@ class SimpleDB:
with connection.cursor() as cursor: with connection.cursor() as cursor:
# Узнать сигнатуру процедуры # Узнать сигнатуру процедуры
cursor.execute(""" cursor.execute("""
SELECT SELECT position, argument_name, data_type, in_out
argument_name,
data_type,
in_out,
position,
data_length,
data_precision,
data_scale
FROM all_arguments FROM all_arguments
WHERE object_name = 'P_RK_SEND_JSON_LIST_FACEACC' WHERE object_name = 'P_RK_SEND_JSON_LIST_FACEACC'
ORDER BY position ORDER BY position
""") """)
print("Сигнатура процедуры P_RK_SEND_JSON_LIST_FACEACC:") print("Сигнатура процедуры P_RK_SEND_JSON_LIST_FACEACC:")
print("Pos | Name | Type | Direction | Length")
print("-" * 50)
for arg in cursor: for arg in cursor:
pos, name, dtype, direction, length, precision, scale = arg # Преобразуем все в строки для безопасного вывода
print(f"{pos:3d} | {name or 'RETURN':15} | {dtype:15} | {direction:8} | {length or 'N/A':5}") pos_str = str(arg[0]) if arg[0] is not None else "0"
name_str = str(arg[1]) if arg[1] is not None else "RETURN"
type_str = str(arg[2]) if arg[2] is not None else "UNKNOWN"
dir_str = str(arg[3]) if arg[3] is not None else "UNKNOWN"
print(f"Позиция {pos_str}: {name_str} ({type_str}) - {dir_str}")
for id, value in dict_data.items(): for id, value in dict_data.items():
if len(value) != 5: if len(value) != 5: