dbhydra 2.3.3__tar.gz → 2.3.5__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.3.5/LICENSE +22 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/PKG-INFO +1 -1
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/dbhydra_core.py +4 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/src/abstract_db.py +1 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/src/abstract_table.py +6 -3
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/src/xlsx_db.py +2 -1
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra.egg-info/PKG-INFO +1 -1
- {dbhydra-2.3.3 → dbhydra-2.3.5}/setup.py +1 -1
- dbhydra-2.3.3/LICENSE +0 -19
- {dbhydra-2.3.3 → dbhydra-2.3.5}/README.md +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/__init__.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/src/__init__.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/src/bigquery_db.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/src/errors/__init__.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/src/errors/exceptions.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/src/migrator.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/src/mongo_db.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/src/mysql_db.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/src/postgres_db.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/src/sqlserver_db.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/src/tables.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/test_migrator.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/tests/__init__.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/tests/test_cases.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/tests/test_mongo.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/tests/test_mysql_ddl.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra/tests/test_sql.py +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra.egg-info/SOURCES.txt +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra.egg-info/dependency_links.txt +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra.egg-info/requires.txt +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/dbhydra.egg-info/top_level.txt +0 -0
- {dbhydra-2.3.3 → dbhydra-2.3.5}/setup.cfg +0 -0
dbhydra-2.3.5/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 DovaX
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
@@ -26,6 +26,10 @@ class Blob(str):
|
|
|
26
26
|
"""Store BLOBs up to 16MB."""
|
|
27
27
|
pass
|
|
28
28
|
|
|
29
|
+
class LongText(str):
|
|
30
|
+
"""Store long text strings (maps to MySQL LONGTEXT)."""
|
|
31
|
+
pass
|
|
32
|
+
|
|
29
33
|
|
|
30
34
|
class LongText(str):
|
|
31
35
|
"""Marker type for columns that should be mapped to LONGTEXT in SQL backends."""
|
|
@@ -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
|
dbhydra-2.3.3/LICENSE
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
Copyright (c) 2020 The Python Packaging Authority
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
-
in the Software without restriction, including without limitation the rights
|
|
6
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
-
furnished to do so, subject to the following conditions:
|
|
9
|
-
|
|
10
|
-
The above copyright notice and this permission notice shall be included in all
|
|
11
|
-
copies or substantial portions of the Software.
|
|
12
|
-
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
-
SOFTWARE.
|
|
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
|