File size: 2,654 Bytes
c7f4bd0
 
1
2
3
{"nwo":"Creditas\/challenge","sha":"2afd1c67fd572a5f3176d20e72ef4557cff1e557","path":"analytics-data-development\/Connection.py","language":"python","identifier":"Connection.create_conecction","parameters":"(db_file)","argument_list":"","return_statement":"return conn","docstring":"Creates a conection on the SQLite database\n        :param db_file: Database name","docstring_summary":"Creates a conection on the SQLite database\n        :param db_file: Database name","docstring_tokens":["Creates","a","conection","on","the","SQLite","database",":","param","db_file",":","Database","name"],"function":"def create_conecction(db_file):\n        \"\"\" Creates a conection on the SQLite database\n        :param db_file: Database name\n        \"\"\"\n        conn = None\n        try:\n            conn = sqlite3.connect(db_file)\n            print('Database created')\n        except Error as e:\n            print(e)\n        return conn","function_tokens":["def","create_conecction","(","db_file",")",":","conn","=","None","try",":","conn","=","sqlite3",".","connect","(","db_file",")","print","(","'Database created'",")","except","Error","as","e",":","print","(","e",")","return","conn"],"url":"https:\/\/github.com\/Creditas\/challenge\/blob\/2afd1c67fd572a5f3176d20e72ef4557cff1e557\/analytics-data-development\/Connection.py#L6-L16"}
{"nwo":"Creditas\/challenge","sha":"2afd1c67fd572a5f3176d20e72ef4557cff1e557","path":"analytics-data-development\/Connection.py","language":"python","identifier":"Connection.execute","parameters":"(self, conn, sql)","argument_list":"","return_statement":"","docstring":"Executes a command with a cursor\n        :param conn: Connection object\n        :param sql: SQL command","docstring_summary":"Executes a command with a cursor\n        :param conn: Connection object\n        :param sql: SQL command","docstring_tokens":["Executes","a","command","with","a","cursor",":","param","conn",":","Connection","object",":","param","sql",":","SQL","command"],"function":"def execute(self, conn, sql):\n        \"\"\" Executes a command with a cursor\n        :param conn: Connection object\n        :param sql: SQL command\n        \"\"\"\n        try:\n            c = conn.cursor()\n            c.execute(sql)\n        except Error as e:\n            print(e)","function_tokens":["def","execute","(","self",",","conn",",","sql",")",":","try",":","c","=","conn",".","cursor","(",")","c",".","execute","(","sql",")","except","Error","as","e",":","print","(","e",")"],"url":"https:\/\/github.com\/Creditas\/challenge\/blob\/2afd1c67fd572a5f3176d20e72ef4557cff1e557\/analytics-data-development\/Connection.py#L18-L27"}