sqlakit 0.22.0__tar.gz → 0.22.2__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.
- {sqlakit-0.22.0 → sqlakit-0.22.2}/PKG-INFO +8 -1
- {sqlakit-0.22.0 → sqlakit-0.22.2}/README.md +7 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/pyproject.toml +1 -1
- {sqlakit-0.22.0 → sqlakit-0.22.2}/pyproject.toml.orig +1 -1
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/_project.py +5 -3
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/_sqruff.py +1 -2
- {sqlakit-0.22.0 → sqlakit-0.22.2}/LICENSE +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/__init__.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/_base.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/_cli.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/_db.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/_discovery.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/_model.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/_pycharm.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/_query.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/_recording.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/_registry.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/_routing.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/_sql.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/_static.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/asyncio/__init__.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/asyncio/_db.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/asyncio/_registry.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/asyncio/orm.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/asyncio/sql.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/exceptions.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/orm.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/py.typed +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/pytest_plugin.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/sql.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/testing.py +0 -0
- {sqlakit-0.22.0 → sqlakit-0.22.2}/sqlakit/types.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sqlakit
|
|
3
|
-
Version: 0.22.
|
|
3
|
+
Version: 0.22.2
|
|
4
4
|
Summary: A toolkit for SQLAlchemy applications.
|
|
5
5
|
Keywords: sqlalchemy,database,orm,sql,asyncio
|
|
6
6
|
Author: Anton Ruhlov
|
|
@@ -133,6 +133,13 @@ shows the source file of each query right away.
|
|
|
133
133
|
that can't work, before the query runs. See [template
|
|
134
134
|
validation](docs/sql.md#template-validation).
|
|
135
135
|
|
|
136
|
+
The [VS Code
|
|
137
|
+
extension](https://marketplace.visualstudio.com/items?itemName=sqlakit.sqlakit)
|
|
138
|
+
completes the macros, links a template name in Python to its file, marks the
|
|
139
|
+
same problems as you type, and shows a template rendered as the database gets
|
|
140
|
+
it. It runs `sqlakit-lsp`, a language server any other editor can run too. See
|
|
141
|
+
[editor support](docs/sql.md#editor-support).
|
|
142
|
+
|
|
136
143
|
### From a string
|
|
137
144
|
|
|
138
145
|
```python
|
|
@@ -102,6 +102,13 @@ shows the source file of each query right away.
|
|
|
102
102
|
that can't work, before the query runs. See [template
|
|
103
103
|
validation](docs/sql.md#template-validation).
|
|
104
104
|
|
|
105
|
+
The [VS Code
|
|
106
|
+
extension](https://marketplace.visualstudio.com/items?itemName=sqlakit.sqlakit)
|
|
107
|
+
completes the macros, links a template name in Python to its file, marks the
|
|
108
|
+
same problems as you type, and shows a template rendered as the database gets
|
|
109
|
+
it. It runs `sqlakit-lsp`, a language server any other editor can run too. See
|
|
110
|
+
[editor support](docs/sql.md#editor-support).
|
|
111
|
+
|
|
105
112
|
### From a string
|
|
106
113
|
|
|
107
114
|
```python
|
|
@@ -70,11 +70,13 @@ RESERVED = RESERVED_WORDS | POSTGRESQL_RESERVED_WORDS
|
|
|
70
70
|
"""Words a parameter cannot stand in for unquoted, on the databases linted most."""
|
|
71
71
|
"""Names SQL keeps for itself, which a linter cannot read a parameter as."""
|
|
72
72
|
|
|
73
|
-
LINT_EXCLUDED = ("RF01", "AL05", "ST03")
|
|
73
|
+
LINT_EXCLUDED = ("RF01", "RF02", "RF03", "AL05", "ST03")
|
|
74
74
|
"""Rules a `tpl.` call trips without anything being wrong with the template.
|
|
75
75
|
|
|
76
|
-
`RF01` reads `tpl.if_set` as a column of a table named `tpl
|
|
77
|
-
`
|
|
76
|
+
`RF01` reads `tpl.if_set` as a column of a table named `tpl`. `RF02` and `RF03`,
|
|
77
|
+
outside `sqruff`'s default rules, read a table a macro takes, `tpl.paid(o)`, as
|
|
78
|
+
a column. `AL05` and `ST03` miss an alias or a CTE used only inside a macro's
|
|
79
|
+
argument.
|
|
78
80
|
"""
|
|
79
81
|
|
|
80
82
|
|
|
@@ -70,6 +70,7 @@ def settings(project: Project, pyproject: str, dialect: str | None) -> str:
|
|
|
70
70
|
"[tool.sqruff.core]",
|
|
71
71
|
*([f'dialect = "{chosen}"'] if chosen else []),
|
|
72
72
|
'templater = "placeholder"',
|
|
73
|
+
'rules = "all"',
|
|
73
74
|
f'exclude_rules = "{",".join(LINT_EXCLUDED)}"',
|
|
74
75
|
]
|
|
75
76
|
text = text.rstrip("\n") + "\n\n" + "\n".join(core) + "\n"
|
|
@@ -78,8 +79,6 @@ def settings(project: Project, pyproject: str, dialect: str | None) -> str:
|
|
|
78
79
|
table = "\n".join(
|
|
79
80
|
[
|
|
80
81
|
"[tool.sqruff.templater.placeholder]",
|
|
81
|
-
"# `sqlakit export sqruff` writes what the templates need, and keeps",
|
|
82
|
-
"# what you add.",
|
|
83
82
|
'param_style = "colon"',
|
|
84
83
|
*(f"{name} = {_toml_value(value)}" for name, value in merged.items()),
|
|
85
84
|
]
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|