dbhydra 2.0.7__tar.gz → 2.0.9__tar.gz
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.
- {dbhydra-2.0.7 → dbhydra-2.0.9}/PKG-INFO +1 -1
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/src/abstract_table.py +8 -1
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/src/tables.py +1 -3
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra.egg-info/PKG-INFO +1 -1
- {dbhydra-2.0.7 → dbhydra-2.0.9}/setup.py +1 -1
- {dbhydra-2.0.7 → dbhydra-2.0.9}/LICENSE +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/README.md +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/__init__.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/dbhydra_core.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/src/__init__.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/src/abstract_db.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/src/bigquery_db.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/src/errors/__init__.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/src/errors/exceptions.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/src/migrator.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/src/mongo_db.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/src/mysql_db.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/src/postgres_db.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/src/sqlserver_db.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/src/xlsx_db.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/tests/__init__.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/tests/test_cases.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/tests/test_mongo.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra/tests/test_sql.py +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra.egg-info/SOURCES.txt +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra.egg-info/dependency_links.txt +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra.egg-info/requires.txt +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/dbhydra.egg-info/top_level.txt +0 -0
- {dbhydra-2.0.7 → dbhydra-2.0.9}/setup.cfg +0 -0
|
@@ -66,10 +66,17 @@ class AbstractSelectable:
|
|
|
66
66
|
|
|
67
67
|
|
|
68
68
|
def _get_selected_columns(self, query):
|
|
69
|
-
|
|
69
|
+
from_keyword_count=query.lower().count("from") #There can be "from" substrings in column names: e.g. SELECT uid,from_node_uid,to_node_uid,channel,visible,pipeline_uid,project_uid FROM edges
|
|
70
|
+
#print("COUNT", from_keyword_count)
|
|
71
|
+
if from_keyword_count==1:
|
|
72
|
+
column_string = query.lower().split("from")[0]
|
|
73
|
+
else:
|
|
74
|
+
column_string = "from".join(query.lower().split("from")[0:(from_keyword_count)])
|
|
75
|
+
#print("column string",column_string)
|
|
70
76
|
if "*" in column_string:
|
|
71
77
|
columns = self.columns
|
|
72
78
|
elif column_string.find(",") == -1:
|
|
79
|
+
assert column_string.count("select")<=1 #assume there are no table columns containing "select" substring
|
|
73
80
|
columns = [column_string.replace("select","").strip()]
|
|
74
81
|
else:
|
|
75
82
|
columns = [x.strip() for x in column_string.split(",")]
|
|
@@ -603,8 +603,7 @@ class Table(SqlServerTable):
|
|
|
603
603
|
|
|
604
604
|
class MysqlTable(AbstractTable):
|
|
605
605
|
def __init__(self, db1, name, columns=None, types=None, id_column_name = "id"):
|
|
606
|
-
super().__init__(db1, name, columns)
|
|
607
|
-
self.types = types
|
|
606
|
+
super().__init__(db1, name, columns, types)
|
|
608
607
|
self.id_column_name = id_column_name
|
|
609
608
|
|
|
610
609
|
#Disabled because it is inherited
|
|
@@ -880,7 +879,6 @@ class MysqlTable(AbstractTable):
|
|
|
880
879
|
class XlsxTable(AbstractTable):
|
|
881
880
|
def __init__(self, db1, name, columns=None, types=None, id_column_name = "id"):
|
|
882
881
|
super().__init__(db1, name, columns, types)
|
|
883
|
-
self.types = types
|
|
884
882
|
self.id_column_name = id_column_name
|
|
885
883
|
|
|
886
884
|
table_filename = f"{self.name}.csv" if self.db1.is_csv else f"{self.name}.xlsx"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|