Compare commits

..

No commits in common. '492dc8f374631e01f5c447a7ba81d7cfb1b217a2' and 'e848367378b6cc907f45abe97a3aa0a0202c40f9' have entirely different histories.

@ -1,6 +1,6 @@
__app_name__ = 'data-transport'
__author__ = 'The Phi Technology'
__version__= '2.2.6'
__version__= '2.2.4'
__email__ = "info@the-phi.com"
__license__=f"""
Copyright 2010 - 2024, Steve L. Nyemba

@ -1 +1 @@
from . import files, http, rabbitmq, callback, files, console
from . import files, http, rabbitmq, callback, files

@ -3,8 +3,6 @@ This file encapsulates common operations associated with SQL databases via SQLAl
"""
import sqlalchemy as sqa
from sqlalchemy import text
import pandas as pd
class Base:
@ -58,15 +56,7 @@ class Base:
@TODO: Execution of stored procedures
"""
if sql.lower().startswith('select') or sql.lower().startswith('with') :
return pd.read_sql(sql,self._engine)
else:
_handler = self._engine.connect()
_handler.execute(text(sql))
_handler.commit ()
_handler.close()
return None
return pd.read_sql(sql,self._engine) if sql.lower().startswith('select') or sql.lower().startswith('with') else None
class SQLBase(Base):
def __init__(self,**_args):

@ -5,10 +5,7 @@ from transport.sql.common import Base, BaseReader, BaseWriter
class Duck :
def __init__(self,**_args):
#
# duckdb with none as database will operate as an in-memory database
#
self.database = _args['database'] if 'database' in _args else ''
self.database = _args['database']
def get_provider(self):
return "duckdb"

Loading…
Cancel
Save