rda-python-common 2.0.20__tar.gz → 2.1.1__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.
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/PKG-INFO +1 -1
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/pyproject.toml +1 -1
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/pg_dbi.py +9 -8
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/PKG-INFO +1 -1
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/LICENSE +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/README.md +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/setup.cfg +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/PgCMD.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/PgDBI.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/PgFile.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/PgLOG.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/PgLock.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/PgOPT.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/PgSIG.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/PgSplit.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/PgUtil.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/__init__.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/pg_cmd.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/pg_file.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/pg_lock.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/pg_log.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/pg_opt.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/pg_password.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/pg_sig.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/pg_split.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/pg_util.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common/pgpassword.py +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/SOURCES.txt +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/dependency_links.txt +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/entry_points.txt +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/requires.txt +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/top_level.txt +0 -0
- {rda_python_common-2.0.20 → rda_python_common-2.1.1}/test/test_common.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rda_python_common
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: RDA Python common library codes shared by other RDA python packages
|
|
5
5
|
Author-email: Zaihua Ji <zji@ucar.edu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/NCAR/rda-python-common
|
|
@@ -20,17 +20,18 @@ from os import path as op
|
|
|
20
20
|
from .pg_log import PgLOG
|
|
21
21
|
|
|
22
22
|
class PgDBI(PgLOG):
|
|
23
|
-
|
|
24
|
-
# PostgreSQL specified query timestamp format
|
|
25
|
-
fmtyr = lambda fn: "extract(year from {})::int".format(fn)
|
|
26
|
-
fmtqt = lambda fn: "extract(quarter from {})::int".format(fn)
|
|
27
|
-
fmtmn = lambda fn: "extract(month from {})::int".format(fn)
|
|
28
|
-
fmtdt = lambda fn: "date({})".format(fn)
|
|
29
|
-
fmtym = lambda fn: "to_char({}, 'yyyy-mm')".format(fn)
|
|
30
|
-
fmthr = lambda fn: "extract(hour from {})::int".format(fn)
|
|
31
23
|
|
|
32
24
|
def __init__(self):
|
|
33
25
|
super().__init__() # initialize parent class
|
|
26
|
+
|
|
27
|
+
# PostgreSQL specified query timestamp format
|
|
28
|
+
self.fmtyr = lambda fn=self: "extract(year from {})::int".format(fn)
|
|
29
|
+
self.fmtqt = lambda fn=self: "extract(quarter from {})::int".format(fn)
|
|
30
|
+
self.fmtmn = lambda fn=self: "extract(month from {})::int".format(fn)
|
|
31
|
+
self.fmtdt = lambda fn=self: "date({})".format(fn)
|
|
32
|
+
self.fmtym = lambda fn=self: "to_char({}, 'yyyy-mm')".format(fn)
|
|
33
|
+
self.fmthr = lambda fn=self: "extract(hour from {})::int".format(fn)
|
|
34
|
+
|
|
34
35
|
self.pgdb = None # reference to a connected database object
|
|
35
36
|
self.curtran = 0 # 0 - no transaction, 1 - in transaction
|
|
36
37
|
self.NMISSES = [] # array of mising userno
|
{rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rda_python_common
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: RDA Python common library codes shared by other RDA python packages
|
|
5
5
|
Author-email: Zaihua Ji <zji@ucar.edu>
|
|
6
6
|
Project-URL: Homepage, https://github.com/NCAR/rda-python-common
|
|
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
|
{rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/requires.txt
RENAMED
|
File without changes
|
{rda_python_common-2.0.20 → rda_python_common-2.1.1}/src/rda_python_common.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|