clear_arguments_sqlite(sid, did, scid, func_id) This method is responsible for clearing function arguments from sqlite database Parameters: sid - Server Id did - Database Id scid - Schema Id func_id - Function Id
(sid, did, scid, func_id)
| 1979 | ) |
| 1980 | @pga_login_required |
| 1981 | def clear_arguments_sqlite(sid, did, scid, func_id): |
| 1982 | """ |
| 1983 | clear_arguments_sqlite(sid, did, scid, func_id) |
| 1984 | |
| 1985 | This method is responsible for clearing function arguments |
| 1986 | from sqlite database |
| 1987 | |
| 1988 | Parameters: |
| 1989 | sid |
| 1990 | - Server Id |
| 1991 | did |
| 1992 | - Database Id |
| 1993 | scid |
| 1994 | - Schema Id |
| 1995 | func_id |
| 1996 | - Function Id |
| 1997 | """ |
| 1998 | |
| 1999 | if get_server(sid) is None: |
| 2000 | return make_json_response( |
| 2001 | status=410, success=0, |
| 2002 | errormsg=gettext("Could not find the required server.") |
| 2003 | ) |
| 2004 | |
| 2005 | try: |
| 2006 | db.session.query(DebuggerFunctionArguments) \ |
| 2007 | .filter(DebuggerFunctionArguments.server_id == sid, |
| 2008 | DebuggerFunctionArguments.database_id == did, |
| 2009 | DebuggerFunctionArguments.schema_id == scid, |
| 2010 | DebuggerFunctionArguments.function_id == func_id, |
| 2011 | DebuggerFunctionArguments.user_id == |
| 2012 | current_user.id) \ |
| 2013 | .delete() |
| 2014 | |
| 2015 | db.session.commit() |
| 2016 | |
| 2017 | except Exception as e: |
| 2018 | db.session.rollback() |
| 2019 | current_app.logger.exception(e) |
| 2020 | return make_json_response( |
| 2021 | status=410, |
| 2022 | success=0, |
| 2023 | errormsg=str(e) |
| 2024 | ) |
| 2025 | |
| 2026 | return make_json_response(data={'status': True, 'result': 'Success'}) |
| 2027 | |
| 2028 | |
| 2029 | def convert_data_to_dict(conn, result): |
nothing calls this directly
no test coverage detected