velocity-python 0.0.86__py3-none-any.whl → 0.0.88__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.
Potentially problematic release.
This version of velocity-python might be problematic. Click here for more details.
- velocity/__init__.py +1 -1
- velocity/db/core/engine.py +0 -12
- velocity/db/core/table.py +1 -14
- {velocity_python-0.0.86.dist-info → velocity_python-0.0.88.dist-info}/METADATA +1 -1
- {velocity_python-0.0.86.dist-info → velocity_python-0.0.88.dist-info}/RECORD +8 -8
- {velocity_python-0.0.86.dist-info → velocity_python-0.0.88.dist-info}/WHEEL +0 -0
- {velocity_python-0.0.86.dist-info → velocity_python-0.0.88.dist-info}/licenses/LICENSE +0 -0
- {velocity_python-0.0.86.dist-info → velocity_python-0.0.88.dist-info}/top_level.txt +0 -0
velocity/__init__.py
CHANGED
velocity/db/core/engine.py
CHANGED
|
@@ -56,18 +56,12 @@ class Engine:
|
|
|
56
56
|
config = self.config.copy()
|
|
57
57
|
if timeout_key not in config:
|
|
58
58
|
config[timeout_key] = timeout_val
|
|
59
|
-
logger.info(
|
|
60
|
-
"Connecting to %s with dict config: %s", self.sql.server, config
|
|
61
|
-
)
|
|
62
59
|
return self.driver.connect(**config)
|
|
63
60
|
|
|
64
61
|
elif isinstance(self.config, str):
|
|
65
62
|
conn_str = self.config
|
|
66
63
|
if timeout_key not in conn_str:
|
|
67
64
|
conn_str += f" {timeout_key}={timeout_val}"
|
|
68
|
-
logger.info(
|
|
69
|
-
"Connecting to %s with str config: %s", self.sql.server, conn_str
|
|
70
|
-
)
|
|
71
65
|
return self.driver.connect(conn_str)
|
|
72
66
|
|
|
73
67
|
elif isinstance(self.config, (tuple, list)):
|
|
@@ -77,12 +71,6 @@ class Engine:
|
|
|
77
71
|
config_args[-1][timeout_key] = timeout_val
|
|
78
72
|
else:
|
|
79
73
|
config_args.append({timeout_key: timeout_val})
|
|
80
|
-
|
|
81
|
-
logger.info(
|
|
82
|
-
"Connecting to %s with tuple/list config (with timeout): %s",
|
|
83
|
-
self.sql.server,
|
|
84
|
-
config_args,
|
|
85
|
-
)
|
|
86
74
|
return self.driver.connect(*config_args)
|
|
87
75
|
|
|
88
76
|
else:
|
velocity/db/core/table.py
CHANGED
|
@@ -286,6 +286,7 @@ class Table:
|
|
|
286
286
|
if use_where:
|
|
287
287
|
return Row(self, where, lock=lock)
|
|
288
288
|
return Row(self, result[0]["sys_id"], lock=lock)
|
|
289
|
+
one=find
|
|
289
290
|
|
|
290
291
|
@return_default(None)
|
|
291
292
|
def first(
|
|
@@ -319,20 +320,6 @@ class Table:
|
|
|
319
320
|
return Row(self, where, lock=lock)
|
|
320
321
|
return Row(self, results[0]["sys_id"], lock=lock)
|
|
321
322
|
|
|
322
|
-
@return_default(None)
|
|
323
|
-
def one(self, where=None, orderby=None, lock=None, use_where=False):
|
|
324
|
-
"""
|
|
325
|
-
Returns exactly one row matching `where`, or None if none found.
|
|
326
|
-
"""
|
|
327
|
-
if isinstance(where, int):
|
|
328
|
-
where = {"sys_id": where}
|
|
329
|
-
results = self.select("sys_id", where=where, orderby=orderby).all()
|
|
330
|
-
if not results:
|
|
331
|
-
return None
|
|
332
|
-
if use_where:
|
|
333
|
-
return Row(self, where, lock=lock)
|
|
334
|
-
return Row(self, results[0]["sys_id"], lock=lock)
|
|
335
|
-
|
|
336
323
|
def primary_keys(self):
|
|
337
324
|
"""
|
|
338
325
|
Returns the list of primary key columns for this table.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: velocity-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.88
|
|
4
4
|
Summary: A rapid application development library for interfacing with data storage
|
|
5
5
|
Author-email: Paul Perez <pperez@codeclubs.org>
|
|
6
6
|
Project-URL: Homepage, https://codeclubs.org/projects/velocity
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
velocity/__init__.py,sha256=
|
|
1
|
+
velocity/__init__.py,sha256=Li52KlOhqYiPsceaR_8oeXe58Sl2Sp95iPr6m5Z2JfM,106
|
|
2
2
|
velocity/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
velocity/app/invoices.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
velocity/app/orders.py,sha256=W-HAXEwY8-IFXbKh82HnMeRVZM7P-TWGEQOWtkLIzI4,6298
|
|
@@ -16,12 +16,12 @@ velocity/db/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,
|
|
|
16
16
|
velocity/db/core/column.py,sha256=tAr8tL3a2nyaYpNHhGl508FrY_pGZTzyYgjAV5CEBv4,4092
|
|
17
17
|
velocity/db/core/database.py,sha256=3zNGItklu9tZCKsbx2T2vCcU1so8AL9PPL0DLjvaz6s,3554
|
|
18
18
|
velocity/db/core/decorators.py,sha256=76Jkr9XptXt8cvcgp1zbHfuL8uHzWy8lwfR29u-DVu4,4574
|
|
19
|
-
velocity/db/core/engine.py,sha256=
|
|
19
|
+
velocity/db/core/engine.py,sha256=3POukyvvtGVTwEGx4vsAInWw_WGGsqMdBFozoPUnIi0,14665
|
|
20
20
|
velocity/db/core/exceptions.py,sha256=MOWyA1mlMe8eWbFkEHK0Lp9czdplpRyqbAn2JfGmMrM,707
|
|
21
21
|
velocity/db/core/result.py,sha256=OVqoMwlx3CHNNwr-JGWRx5I8u_YX6hlUpecx99UT5nE,6164
|
|
22
22
|
velocity/db/core/row.py,sha256=aliLYTTFirgJsOvmUsANwJMyxaATuhpGpFJhcu_twwY,6709
|
|
23
23
|
velocity/db/core/sequence.py,sha256=VMBc0ZjGnOaWTwKW6xMNTdP8rZ2umQ8ml4fHTTwuGq4,3904
|
|
24
|
-
velocity/db/core/table.py,sha256=
|
|
24
|
+
velocity/db/core/table.py,sha256=g2mq7_VzLBtxITAn47BbgMcUoJAy9XVP6ohzScNl_so,34573
|
|
25
25
|
velocity/db/core/transaction.py,sha256=IQEmrHAjCg6hqxQQOpPLWUbyLXrTjIPGLHHv7P6urKU,6589
|
|
26
26
|
velocity/db/servers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
27
|
velocity/db/servers/mysql.py,sha256=qHwlB_Mg02R7QFjD5QvJCorYYiP50CqEiQyZVl3uYns,20914
|
|
@@ -47,8 +47,8 @@ velocity/misc/tools.py,sha256=_bGneHHA_BV-kUonzw5H3hdJ5AOJRCKfzhgpkFbGqIo,1502
|
|
|
47
47
|
velocity/misc/conv/__init__.py,sha256=MLYF58QHjzfDSxb1rdnmLnuEQCa3gnhzzZ30CwZVvQo,40
|
|
48
48
|
velocity/misc/conv/iconv.py,sha256=d4_BucW8HTIkGNurJ7GWrtuptqUf-9t79ObzjJ5N76U,10603
|
|
49
49
|
velocity/misc/conv/oconv.py,sha256=h5Lo05DqOQnxoD3y6Px_MQP_V-pBbWf8Hkgkb9Xp1jk,6032
|
|
50
|
-
velocity_python-0.0.
|
|
51
|
-
velocity_python-0.0.
|
|
52
|
-
velocity_python-0.0.
|
|
53
|
-
velocity_python-0.0.
|
|
54
|
-
velocity_python-0.0.
|
|
50
|
+
velocity_python-0.0.88.dist-info/licenses/LICENSE,sha256=aoN245GG8s9oRUU89KNiGTU4_4OtnNmVi4hQeChg6rM,1076
|
|
51
|
+
velocity_python-0.0.88.dist-info/METADATA,sha256=1x5TcQnlwtyyr1igts32LMFZrrMb9VEU68UGr5P00fA,8586
|
|
52
|
+
velocity_python-0.0.88.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
53
|
+
velocity_python-0.0.88.dist-info/top_level.txt,sha256=JW2vJPmodgdgSz7H6yoZvnxF8S3fTMIv-YJWCT1sNW0,9
|
|
54
|
+
velocity_python-0.0.88.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|