jsqlib 0.8a0__tar.gz → 0.9a0__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.
- {jsqlib-0.8a0 → jsqlib-0.9a0}/PKG-INFO +10 -6
- {jsqlib-0.8a0 → jsqlib-0.9a0}/README.md +5 -1
- {jsqlib-0.8a0 → jsqlib-0.9a0}/jsqlib/__init__.py +1 -2
- {jsqlib-0.8a0 → jsqlib-0.9a0}/jsqlib/core.py +1 -0
- {jsqlib-0.8a0 → jsqlib-0.9a0}/jsqlib/engine.py +2 -1
- {jsqlib-0.8a0 → jsqlib-0.9a0}/jsqlib/helpers/common.py +2 -1
- {jsqlib-0.8a0 → jsqlib-0.9a0}/jsqlib/helpers/constants.py +1 -0
- {jsqlib-0.8a0 → jsqlib-0.9a0}/jsqlib/helpers/types.py +1 -0
- {jsqlib-0.8a0 → jsqlib-0.9a0}/pyproject.toml +31 -47
- {jsqlib-0.8a0 → jsqlib-0.9a0}/jsqlib/helpers/__init__.py +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: jsqlib
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.9a0
|
|
4
4
|
Summary: JSON to SQL query generator
|
|
5
5
|
Home-page: https://gitlab.com/ru-r5/jsqlib
|
|
6
6
|
License: MPL-2.0
|
|
7
7
|
Keywords: sql,json
|
|
8
8
|
Author: pymancer
|
|
9
9
|
Author-email: pymancer@gmail.com
|
|
10
|
-
Requires-Python: >=3.9,<
|
|
10
|
+
Requires-Python: >=3.9,<3.13
|
|
11
11
|
Classifier: Development Status :: 3 - Alpha
|
|
12
12
|
Classifier: Environment :: Console
|
|
13
13
|
Classifier: Intended Audience :: Information Technology
|
|
@@ -21,9 +21,9 @@ Classifier: Programming Language :: Python :: 3.11
|
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
22
|
Classifier: Topic :: Database
|
|
23
23
|
Classifier: Topic :: Software Development :: Libraries
|
|
24
|
-
Requires-Dist: jsonschema (>=4
|
|
25
|
-
Requires-Dist: python-box (>=5
|
|
26
|
-
Requires-Dist: sqlfluff (>=
|
|
24
|
+
Requires-Dist: jsonschema (>=4,<5)
|
|
25
|
+
Requires-Dist: python-box (>=5,<8)
|
|
26
|
+
Requires-Dist: sqlfluff (>=3,<4)
|
|
27
27
|
Project-URL: Documentation, https://gitlab.com/ru-r5/jsqlib/-/wikis/home
|
|
28
28
|
Project-URL: Repository, https://gitlab.com/ru-r5/jsqlib
|
|
29
29
|
Description-Content-Type: text/markdown
|
|
@@ -86,7 +86,7 @@ $ poetry run black jsqlib -S
|
|
|
86
86
|
- lint
|
|
87
87
|
|
|
88
88
|
```sh
|
|
89
|
-
$ poetry run
|
|
89
|
+
$ poetry run ruff check
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
- type checking
|
|
@@ -96,6 +96,10 @@ $ poetry run pyre
|
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
## Release History
|
|
99
|
+
- 0.9a0
|
|
100
|
+
- CHANGE: python-box library updated to version 7 (#28)
|
|
101
|
+
- CHANGE: sqlfluff library updated to version 3. Warning: query.prettify output may change. (#34)
|
|
102
|
+
- CHANGE: python 3.12 support (#35)
|
|
99
103
|
- 0.8a0
|
|
100
104
|
- CHANGE: nested `select` in `insert from select` statement (#31)
|
|
101
105
|
- 0.7a0
|
|
@@ -56,7 +56,7 @@ $ poetry run black jsqlib -S
|
|
|
56
56
|
- lint
|
|
57
57
|
|
|
58
58
|
```sh
|
|
59
|
-
$ poetry run
|
|
59
|
+
$ poetry run ruff check
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
- type checking
|
|
@@ -66,6 +66,10 @@ $ poetry run pyre
|
|
|
66
66
|
```
|
|
67
67
|
|
|
68
68
|
## Release History
|
|
69
|
+
- 0.9a0
|
|
70
|
+
- CHANGE: python-box library updated to version 7 (#28)
|
|
71
|
+
- CHANGE: sqlfluff library updated to version 3. Warning: query.prettify output may change. (#34)
|
|
72
|
+
- CHANGE: python 3.12 support (#35)
|
|
69
73
|
- 0.8a0
|
|
70
74
|
- CHANGE: nested `select` in `insert from select` statement (#31)
|
|
71
75
|
- 0.7a0
|
|
@@ -6,6 +6,7 @@ Created on Jul 29, 2021
|
|
|
6
6
|
|
|
7
7
|
@author: pymancer@gmail.com (polyanalitika.ru)
|
|
8
8
|
"""
|
|
9
|
+
|
|
9
10
|
import json
|
|
10
11
|
import sqlfluff
|
|
11
12
|
|
|
@@ -88,7 +89,7 @@ class Query:
|
|
|
88
89
|
if not isinstance(schema, dict):
|
|
89
90
|
schema = True
|
|
90
91
|
|
|
91
|
-
return validator_for(schema)(schema)
|
|
92
|
+
return validator_for(schema)(schema) # pyre-ignore[20]
|
|
92
93
|
|
|
93
94
|
def prettify(
|
|
94
95
|
self, sql: Optional[str] = None, dialect: Optional[str] = None, rules: Optional[List[str]] = None
|
|
@@ -6,6 +6,7 @@ Created on Aug 10, 2021
|
|
|
6
6
|
|
|
7
7
|
@author: pymancer@gmail.com (polyanalitika.ru)
|
|
8
8
|
"""
|
|
9
|
+
|
|
9
10
|
from __future__ import annotations
|
|
10
11
|
|
|
11
12
|
from re import sub as resub
|
|
@@ -234,7 +235,7 @@ class Tokenizer:
|
|
|
234
235
|
false = self.translator.cast.false
|
|
235
236
|
null = self.translator.cast.null
|
|
236
237
|
|
|
237
|
-
if type_
|
|
238
|
+
if type_ is bool:
|
|
238
239
|
result = true if value else false
|
|
239
240
|
elif type_ == NoneType:
|
|
240
241
|
result = null
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "jsqlib"
|
|
3
|
-
version = "0"
|
|
3
|
+
version = "0.9a0"
|
|
4
4
|
license = "MPL-2.0"
|
|
5
5
|
description = "JSON to SQL query generator"
|
|
6
6
|
authors = ["pymancer <pymancer@gmail.com>"]
|
|
@@ -16,39 +16,40 @@ classifiers = [
|
|
|
16
16
|
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
|
|
17
17
|
"Operating System :: OS Independent",
|
|
18
18
|
"Programming Language :: Python :: 3.9",
|
|
19
|
+
"Programming Language :: Python :: 3.10",
|
|
20
|
+
"Programming Language :: Python :: 3.11",
|
|
21
|
+
"Programming Language :: Python :: 3.12",
|
|
19
22
|
"Topic :: Database",
|
|
20
23
|
"Topic :: Software Development :: Libraries"
|
|
21
24
|
]
|
|
22
25
|
|
|
23
26
|
[tool.poetry.dependencies]
|
|
24
|
-
python = "
|
|
25
|
-
python-box = "
|
|
26
|
-
sqlfluff = "^
|
|
27
|
-
jsonschema = "^4
|
|
27
|
+
python = ">=3.9,<3.13"
|
|
28
|
+
python-box = ">=5,<8"
|
|
29
|
+
sqlfluff = "^3"
|
|
30
|
+
jsonschema = "^4"
|
|
28
31
|
|
|
29
32
|
[tool.poetry.group.dev.dependencies]
|
|
30
|
-
black = "^
|
|
31
|
-
icecream = "^2.
|
|
33
|
+
black = "^24.0"
|
|
34
|
+
icecream = "^2.0"
|
|
32
35
|
|
|
33
36
|
[tool.poetry.dev-dependencies]
|
|
34
|
-
pytest = "^
|
|
35
|
-
coverage = {extras = ["toml"], version = "^
|
|
36
|
-
pytest-cov = "^
|
|
37
|
-
pre-commit = "^
|
|
38
|
-
|
|
39
|
-
flake8 = "^3"
|
|
40
|
-
flakehell = "^0.9"
|
|
37
|
+
pytest = "^8"
|
|
38
|
+
coverage = {extras = ["toml"], version = "^7"}
|
|
39
|
+
pytest-cov = "^5"
|
|
40
|
+
pre-commit = "^3"
|
|
41
|
+
ruff = "^0"
|
|
41
42
|
pyre-check = "^0.9"
|
|
42
43
|
|
|
43
44
|
[build-system]
|
|
44
|
-
requires = ["
|
|
45
|
+
requires = ["poetry-core"]
|
|
45
46
|
build-backend = "poetry.core.masonry.api"
|
|
46
47
|
|
|
47
48
|
[tool.poetry-version-plugin]
|
|
48
49
|
source = "init"
|
|
49
50
|
|
|
50
51
|
[tool.pytest.ini_options]
|
|
51
|
-
minversion = "
|
|
52
|
+
minversion = "8.0"
|
|
52
53
|
addopts = "-q"
|
|
53
54
|
testpaths = ["tests"]
|
|
54
55
|
|
|
@@ -60,38 +61,21 @@ fail_under = 90
|
|
|
60
61
|
|
|
61
62
|
[tool.black]
|
|
62
63
|
line-length = 120
|
|
63
|
-
target-version = ['
|
|
64
|
+
target-version = ['py312']
|
|
64
65
|
include = "jsqlib"
|
|
65
66
|
|
|
66
|
-
[tool.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
flake8-bugbear = ["+*"]
|
|
76
|
-
flake8-builtins = ["+*"]
|
|
77
|
-
flake8-comprehensions = ["+*"]
|
|
78
|
-
flake8-darglint = ["+*"]
|
|
79
|
-
flake8-docstrings = ["+*"]
|
|
80
|
-
flake8-eradicate = ["+*"]
|
|
81
|
-
flake8-isort = ["+*"]
|
|
82
|
-
flake8-mutable = ["+*"]
|
|
83
|
-
flake8-pytest-style = ["+*"]
|
|
84
|
-
flake8-spellcheck = ["+*"]
|
|
85
|
-
pep8-naming = ["+*"]
|
|
86
|
-
pycodestyle = ["+*", "-E203", "-E501", "-W503"]
|
|
87
|
-
pyflakes = ["+*"]
|
|
88
|
-
pylint = ["+*"]
|
|
67
|
+
[tool.ruff]
|
|
68
|
+
line-length = 120
|
|
69
|
+
indent-width = 4
|
|
70
|
+
target-version = "py312"
|
|
71
|
+
exclude = [
|
|
72
|
+
'README.md',
|
|
73
|
+
'tests',
|
|
74
|
+
'.venv'
|
|
75
|
+
]
|
|
89
76
|
|
|
90
|
-
[tool.
|
|
91
|
-
|
|
92
|
-
pyflakes = ["-*"]
|
|
93
|
-
flake8-darglint = ["-*"]
|
|
94
|
-
flake8-docstrings = ["-*"]
|
|
77
|
+
[tool.ruff.lint]
|
|
78
|
+
ignore = ['E501']
|
|
95
79
|
|
|
96
|
-
[tool.
|
|
97
|
-
|
|
80
|
+
[tool.ruff.lint.per-file-ignores]
|
|
81
|
+
"__init__.py" = ["E402"]
|
|
File without changes
|