def create(command, cursor, connection): if len(command) >= 5: args = cursor.callproc('SALARIES_tapi.ins', (int( command[1]), int(command[3]), int(command[4]), int(command[2]), 0)) res = int(args[4]) connection.commit() notifiers.notify_insert(res)
def create(command, cursor, connection): if len(command) >= 5: args = cursor.callproc('PREMIUMS_SIZES_tapi.ins', (int(command[2]), int(command[3]), " ".join( command[4:]), 0, command[1])) res = int(args[3]) connection.commit() notifiers.notify_insert(res)
def create(command, cursor, connection): if len(command) == 2: res = cursor.callfunc('WORKERS_STATES_tapi.ins_f', cx_Oracle.NUMBER, (None, command[1])) connection.commit() elif len(command) > 2: res = cursor.callfunc('WORKERS_STATES_tapi.ins_f', cx_Oracle.NUMBER, (" ".join(command[2:]), command[1])) connection.commit() notifiers.notify_insert(res)
def create(command, cursor, connection): if len(command) == 2: args = cursor.callproc('POSITIONS_tapi.ins', (None, 5, command[1])) res = args[1] connection.commit() elif len(command) > 2: args = cursor.callproc('POSITIONS_tapi.ins', (" ".join(command[2:]), command[1])) res = args[1] connection.commit() notifiers.notify_insert(res)
def create(command, cursor, conn, columns, table_name, tapi_name): print(get_parameters_for_insert(columns, command)) argss = get_parameters_for_insert(columns, command) ss = [2] for arg in argss: ss.append(arg) args = cursor.callproc(tapi_name+'.ins', ss) res = int(args[columns[0][4]]) conn.commit() notifiers.notify_insert(res) connection.redis_connector.set(table_name+"_is_relevant","False")
def create(command, cursor, connection): if len(command) == 3: args = cursor.callproc('SERVICES_tapi.ins', (command[2], None, 0, None, command[1])) res = int(args[2]) connection.commit() elif len(command) == 4: args = cursor.callproc('SERVICES_tapi.ins', (command[2], None, 0, command[3], command[1])) res = int(args[2]) connection.commit() elif len(command) >= 4: args = cursor.callproc('SERVICES_tapi.ins', (command[2], command[4:], 0, command[3], command[1])) res = int(args[2]) connection.commit() notifiers.notify_insert(res)
def create(command, cursor, connection): args = cursor.callproc('CONTACTS_tapi.ins', (" ".join(command[4:]), command[2], command[1], 0, command[3])) res = args[3] connection.commit() notifiers.notify_insert(res)