bbdd-utils 0.3.8__py3-none-any.whl → 0.3.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- bbdd_utils/utils.py +1 -2
- {bbdd_utils-0.3.8.dist-info → bbdd_utils-0.3.9.dist-info}/METADATA +1 -1
- bbdd_utils-0.3.9.dist-info/RECORD +7 -0
- bbdd_utils-0.3.8.dist-info/RECORD +0 -7
- {bbdd_utils-0.3.8.dist-info → bbdd_utils-0.3.9.dist-info}/WHEEL +0 -0
- {bbdd_utils-0.3.8.dist-info → bbdd_utils-0.3.9.dist-info}/licenses/LICENSE +0 -0
- {bbdd_utils-0.3.8.dist-info → bbdd_utils-0.3.9.dist-info}/top_level.txt +0 -0
bbdd_utils/utils.py
CHANGED
@@ -77,7 +77,6 @@ def Cerrar_conexion(conn):
|
|
77
77
|
def Insert(conn, data):
|
78
78
|
# Verifica el tipo de base de datos con la que estamos trabajando
|
79
79
|
import sqlite3
|
80
|
-
from mysql.connector.connection import MySQLConnection
|
81
80
|
import mysql.connector
|
82
81
|
from pymongo.database import Database
|
83
82
|
############# SQLite ################
|
@@ -97,7 +96,7 @@ def Insert(conn, data):
|
|
97
96
|
print(f"ID: {fila[0]}, Nombre: {fila[1]}, Edad: {fila[2]}")
|
98
97
|
|
99
98
|
############# MySQL ################
|
100
|
-
elif isinstance(conn, mysql.connector.
|
99
|
+
elif isinstance(conn, mysql.connector.connection_cext.CMySQLConnection):
|
101
100
|
print("Conexión exitosa a la base de datos MySQL.")
|
102
101
|
# Si estamos usando MySQL, podemos trabajar con la conexión de esta manera
|
103
102
|
cursor = conn.cursor()
|
@@ -0,0 +1,7 @@
|
|
1
|
+
bbdd_utils/__init__.py,sha256=mjRX7GqWkOJq66KqghZ4MZE0Aai6R89LPeu1mjq4lD4,121
|
2
|
+
bbdd_utils/utils.py,sha256=y6MXdvqEqdNVGhhhlKCawnFMC7RREPmbxWIafg1PgpE,4724
|
3
|
+
bbdd_utils-0.3.9.dist-info/licenses/LICENSE,sha256=D4uqg6QX0fapLNcdUznOuGaRIUPnypOdeE2zIyYq7xY,217
|
4
|
+
bbdd_utils-0.3.9.dist-info/METADATA,sha256=3p0CNjKMid_i1-qdW4-MjcJylzXE9Zl289m4BojsCnA,693
|
5
|
+
bbdd_utils-0.3.9.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
6
|
+
bbdd_utils-0.3.9.dist-info/top_level.txt,sha256=bBGkVkxnOw7tZ2zRcyCM3lgVgYo1hFbcmwkGdKAj9Gk,11
|
7
|
+
bbdd_utils-0.3.9.dist-info/RECORD,,
|
@@ -1,7 +0,0 @@
|
|
1
|
-
bbdd_utils/__init__.py,sha256=mjRX7GqWkOJq66KqghZ4MZE0Aai6R89LPeu1mjq4lD4,121
|
2
|
-
bbdd_utils/utils.py,sha256=WcvRBP43FEVRkOdnbDEBmyTaHH97TPxKhaTBFKe_Rxo,4778
|
3
|
-
bbdd_utils-0.3.8.dist-info/licenses/LICENSE,sha256=D4uqg6QX0fapLNcdUznOuGaRIUPnypOdeE2zIyYq7xY,217
|
4
|
-
bbdd_utils-0.3.8.dist-info/METADATA,sha256=LCM3PdJYCU3s0kWIbuxOnLNE8asoLtfVCt1YTKFFGCs,693
|
5
|
-
bbdd_utils-0.3.8.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
6
|
-
bbdd_utils-0.3.8.dist-info/top_level.txt,sha256=bBGkVkxnOw7tZ2zRcyCM3lgVgYo1hFbcmwkGdKAj9Gk,11
|
7
|
-
bbdd_utils-0.3.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|