dbhydra 2.3.4__py3-none-any.whl → 2.3.5__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.
- dbhydra/src/abstract_table.py +6 -3
- {dbhydra-2.3.4.dist-info → dbhydra-2.3.5.dist-info}/METADATA +1 -1
- {dbhydra-2.3.4.dist-info → dbhydra-2.3.5.dist-info}/RECORD +6 -6
- {dbhydra-2.3.4.dist-info → dbhydra-2.3.5.dist-info}/LICENSE +0 -0
- {dbhydra-2.3.4.dist-info → dbhydra-2.3.5.dist-info}/WHEEL +0 -0
- {dbhydra-2.3.4.dist-info → dbhydra-2.3.5.dist-info}/top_level.txt +0 -0
dbhydra/src/abstract_table.py
CHANGED
|
@@ -134,7 +134,7 @@ class AbstractSelectable:
|
|
|
134
134
|
return(rows)
|
|
135
135
|
|
|
136
136
|
|
|
137
|
-
def select_all(self, debug_mode = False, limit: Optional[int] = None, offset: Optional[int] = None):
|
|
137
|
+
def select_all(self, debug_mode = False, limit: Optional[int] = None, offset: Optional[int] = None, where: Optional[str] = None):
|
|
138
138
|
quote = self.db1.identifier_quote
|
|
139
139
|
all_cols_query = ""
|
|
140
140
|
for col in self.columns:
|
|
@@ -144,6 +144,9 @@ class AbstractSelectable:
|
|
|
144
144
|
|
|
145
145
|
query = f"SELECT {all_cols_query} FROM {quote}{self.name}{quote}"
|
|
146
146
|
|
|
147
|
+
if where:
|
|
148
|
+
query+=" WHERE "+where
|
|
149
|
+
|
|
147
150
|
# Add LIMIT and OFFSET to the query
|
|
148
151
|
if limit is not None and limit > 0:
|
|
149
152
|
if offset is not None and offset > 0:
|
|
@@ -158,8 +161,8 @@ class AbstractSelectable:
|
|
|
158
161
|
list1 = self.select(query, debug_mode = debug_mode)
|
|
159
162
|
return (list1)
|
|
160
163
|
|
|
161
|
-
def select_to_df(self, debug_mode = False, limit: Optional[int] = None, offset: Optional[int] = None):
|
|
162
|
-
rows = self.select_all(debug_mode = debug_mode, limit = limit, offset = offset)
|
|
164
|
+
def select_to_df(self, debug_mode = False, limit: Optional[int] = None, offset: Optional[int] = None, where: Optional[str] = None):
|
|
165
|
+
rows = self.select_all(debug_mode = debug_mode, limit = limit, offset = offset, where = where)
|
|
163
166
|
if self.query_building_enabled:
|
|
164
167
|
self.to_df()
|
|
165
168
|
df=None
|
|
@@ -3,7 +3,7 @@ dbhydra/dbhydra_core.py,sha256=-c_qp-atrOm6BF81fyrcSxlTSNAGBcXe4OS5OZhGqy8,2758
|
|
|
3
3
|
dbhydra/test_migrator.py,sha256=e3Nnb2mCd3CfjhjSexNg1tXVJMjkl5cCoYcuhbfZ4pM,803
|
|
4
4
|
dbhydra/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
dbhydra/src/abstract_db.py,sha256=9lhKV8-UAamwQRi9j1-RpgVQrew6eL0k1BfKjUOZhy8,7205
|
|
6
|
-
dbhydra/src/abstract_table.py,sha256=
|
|
6
|
+
dbhydra/src/abstract_table.py,sha256=kZ4m6sBMwoXiF1gP8rJFZm_yP1T5CnhWeMbIYr4U0es,20322
|
|
7
7
|
dbhydra/src/bigquery_db.py,sha256=77XsgvYbANlvYaJnuVve-kz-PNBx_CHoYCL-eYnA8e4,1834
|
|
8
8
|
dbhydra/src/migrator.py,sha256=QzaODEFfraD9_6HN_Osaidaj-nLYQryCYYWwJtUu3n8,18931
|
|
9
9
|
dbhydra/src/mongo_db.py,sha256=mP48zRjI7mXKpm45R8prroZI-Eo7JKf0KJqGX-oTy3w,1922
|
|
@@ -19,8 +19,8 @@ dbhydra/tests/test_cases.py,sha256=eAFGaHaIaab3md3HHm2_ryb_HHfObtcXDAEzLh4qWx8,5
|
|
|
19
19
|
dbhydra/tests/test_mongo.py,sha256=M8TD72M0iQAk7ZcLTWwLmcmmF_zwALnYEGTWjhQlq0s,1979
|
|
20
20
|
dbhydra/tests/test_mysql_ddl.py,sha256=-gncZE_HjTOAI1yxOn8u5TZkoqoRdShLMF469Trbb9U,3531
|
|
21
21
|
dbhydra/tests/test_sql.py,sha256=aPFXyA0jh8o9VG3B5f9fNz7qDbuVPZ9TcE2twn5dAeQ,3126
|
|
22
|
-
dbhydra-2.3.
|
|
23
|
-
dbhydra-2.3.
|
|
24
|
-
dbhydra-2.3.
|
|
25
|
-
dbhydra-2.3.
|
|
26
|
-
dbhydra-2.3.
|
|
22
|
+
dbhydra-2.3.5.dist-info/LICENSE,sha256=4I49wQQa81vKnbbR7_IlUSZQBc-t7K9SJaQb8UaO81Y,1247
|
|
23
|
+
dbhydra-2.3.5.dist-info/METADATA,sha256=j0uPU0Mqsz7AEPnpp5YkZVuzq0P3I8fowMaD-pV9DsU,2298
|
|
24
|
+
dbhydra-2.3.5.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
|
|
25
|
+
dbhydra-2.3.5.dist-info/top_level.txt,sha256=oO4Gf1T8_txIsIlp11GI0k7PtBIMb9GRwb5ObF4MLVg,8
|
|
26
|
+
dbhydra-2.3.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|