MCPcopy Create free account
hub / github.com/HexHive/NASS / insert_arg

Function insert_arg

data/interface_db.py:69–83  ·  view source on GitHub ↗
(connection, interface_id, arg:Arg, order)

Source from the content-addressed store, hash-verified

67
68
69def insert_arg(connection, interface_id, arg:Arg, order):
70 try:
71 cursor = connection.cursor()
72 insert_query = """
73 INSERT INTO args (interface_id, ordering, type, info, constr)
74 VALUES (?,?,?,?,?)
75 """
76 cursor.execute(insert_query, (interface_id, order, arg.argtype, "", ""))
77 connection.commit()
78 arg_id = cursor.lastrowid
79 cursor.close()
80 return arg_id
81 except Exception as e:
82 logging.error(f'[BINDERDB] Failed inserting arg {str(e)}, {traceback.format_exc()}')
83 print(f'[BINDERDB] Failed inserting arg {str(e)}, {traceback.format_exc()}')
84
85
86def insert_update_arg(connection, interface_id, arg:Arg, order):

Callers 2

insert_update_argFunction · 0.85
insert_interfaceFunction · 0.85

Calls 1

closeMethod · 0.45

Tested by

no test coverage detected