bbdd-utils 0.3.7__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 CHANGED
@@ -77,7 +77,7 @@ 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
80
+ import mysql.connector
81
81
  from pymongo.database import Database
82
82
  ############# SQLite ################
83
83
  if isinstance(conn, sqlite3.Connection):
@@ -96,7 +96,7 @@ def Insert(conn, data):
96
96
  print(f"ID: {fila[0]}, Nombre: {fila[1]}, Edad: {fila[2]}")
97
97
 
98
98
  ############# MySQL ################
99
- elif isinstance(conn, mysql.connector.connection.MySQLConnection):
99
+ elif isinstance(conn, mysql.connector.connection_cext.CMySQLConnection):
100
100
  print("Conexión exitosa a la base de datos MySQL.")
101
101
  # Si estamos usando MySQL, podemos trabajar con la conexión de esta manera
102
102
  cursor = conn.cursor()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bbdd_utils
3
- Version: 0.3.7
3
+ Version: 0.3.9
4
4
  Summary: insertar datos en una base de datos SQL o NoSQL
5
5
  Author: Luis_J_Domingo
6
6
  Description-Content-Type: text/markdown
@@ -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=qD1TLigQ0B4a_M9-H8g_eBIlgaPpE0BSV26o2GjlTS0,4750
3
- bbdd_utils-0.3.7.dist-info/licenses/LICENSE,sha256=D4uqg6QX0fapLNcdUznOuGaRIUPnypOdeE2zIyYq7xY,217
4
- bbdd_utils-0.3.7.dist-info/METADATA,sha256=i5XQI7TiPP92AMg0rJ8FTOimuqwbM253QIvR-QwMYpg,693
5
- bbdd_utils-0.3.7.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
6
- bbdd_utils-0.3.7.dist-info/top_level.txt,sha256=bBGkVkxnOw7tZ2zRcyCM3lgVgYo1hFbcmwkGdKAj9Gk,11
7
- bbdd_utils-0.3.7.dist-info/RECORD,,