sql_querystring_builder 0.1.0__py3-none-any.whl → 0.1.1__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.
- sql_querystring_builder/py.typed +0 -0
- {sql_querystring_builder-0.1.0.dist-info → sql_querystring_builder-0.1.1.dist-info}/METADATA +24 -8
- {sql_querystring_builder-0.1.0.dist-info → sql_querystring_builder-0.1.1.dist-info}/RECORD +6 -5
- {sql_querystring_builder-0.1.0.dist-info → sql_querystring_builder-0.1.1.dist-info}/WHEEL +0 -0
- {sql_querystring_builder-0.1.0.dist-info → sql_querystring_builder-0.1.1.dist-info}/licenses/LICENSE +0 -0
- {sql_querystring_builder-0.1.0.dist-info → sql_querystring_builder-0.1.1.dist-info}/top_level.txt +0 -0
|
File without changes
|
{sql_querystring_builder-0.1.0.dist-info → sql_querystring_builder-0.1.1.dist-info}/METADATA
RENAMED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sql_querystring_builder
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: Wraps string building of MS SQL queries
|
|
5
5
|
Author-email: Wael GRIBAA <g.wael@outlook.fr>
|
|
6
6
|
License-Expression: GPL-3.0-only
|
|
7
7
|
Keywords: sql,query,string
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
9
14
|
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Topic :: Database
|
|
16
|
+
Classifier: Typing :: Typed
|
|
10
17
|
Requires-Python: >=3.10
|
|
11
18
|
Description-Content-Type: text/markdown
|
|
12
19
|
License-File: LICENSE
|
|
@@ -35,14 +42,17 @@ It provides first level validation.
|
|
|
35
42
|
- [x] Field aliases
|
|
36
43
|
|
|
37
44
|
## Not implemented (yet)
|
|
38
|
-
|
|
39
|
-
- [ ]
|
|
40
|
-
- [ ]
|
|
41
|
-
- [ ]
|
|
45
|
+
In planned order:
|
|
46
|
+
- [ ] LEFT, RIGHT, FULL and CROSS joins; SELECT DISTINCT and TOP; paging (OFFSET/FETCH)
|
|
47
|
+
- [ ] Proper conditions: typed values, AND/OR/NOT, IN, BETWEEN, LIKE, IS NULL
|
|
48
|
+
- [ ] Insert and Delete
|
|
49
|
+
- [ ] Functions (aggregates and others), GROUP BY, HAVING, CASE
|
|
50
|
+
- [ ] Compound queries (UNION, INTERSECT, EXCEPT) and sub-queries
|
|
51
|
+
- [ ] Parameterized queries
|
|
42
52
|
|
|
43
53
|
## What it does not do
|
|
44
54
|
Connect to a database server and run the queries by itself.
|
|
45
|
-
It gives you the query as a string, it's then up to
|
|
55
|
+
It gives you the query as a string, it's then up to you to pass it to a SQL engine.
|
|
46
56
|
|
|
47
57
|
## Example
|
|
48
58
|
1. Define the elements of your query:
|
|
@@ -55,7 +65,7 @@ accounts_table = Table("Accounts", "acc").add("id", "customerId", "accountId")
|
|
|
55
65
|
select = Select(customers_table, accounts_table.fields.accountId)
|
|
56
66
|
# Sets an alias for an existing field
|
|
57
67
|
customers_table.fields.customerId.set_alias("cid")
|
|
58
|
-
# Specifies the table to
|
|
68
|
+
# Specifies the table to take as a FROM
|
|
59
69
|
from_ = From(customers_table)
|
|
60
70
|
# Specifies a temporary table for the select
|
|
61
71
|
atemptable = select.to_temptable("a_temp_table")
|
|
@@ -90,7 +100,7 @@ print(query_str)
|
|
|
90
100
|
# > WHERE acc.accountId gt 20000 AND Customers.customerId LIKE 'A1C%'
|
|
91
101
|
# > ORDER BY cid DESC
|
|
92
102
|
```
|
|
93
|
-
4. Manipulate temporary tables
|
|
103
|
+
4. Manipulate temporary tables whose components are inferred:
|
|
94
104
|
```
|
|
95
105
|
# Is able to infer fields from temporary tables and use it as with a regular table.
|
|
96
106
|
temp_select = Select(atemptable)
|
|
@@ -118,6 +128,12 @@ Python 3.10 and above.
|
|
|
118
128
|
(None)
|
|
119
129
|
|
|
120
130
|
## Changelog
|
|
131
|
+
### 0.1.1
|
|
132
|
+
No change to the generated SQL.
|
|
133
|
+
- The package ships a `py.typed` marker, so type checkers such as mypy now use its type hints.
|
|
134
|
+
- PyPI classifiers for the supported Python versions (3.10 to 3.14), typing and topic.
|
|
135
|
+
- The "Not implemented (yet)" list shows the planned features in order; typo fixes.
|
|
136
|
+
|
|
121
137
|
### 0.1.0
|
|
122
138
|
This release changes the generated SQL: check your queries when upgrading.
|
|
123
139
|
- WHERE conditions and the right side of `INNER JOIN ... on` use the field's qualified name (`t1.KeyId`)
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
sql_querystring_builder/__init__.py,sha256=Vyiejs1sPHpZC9Qzo97TQVFDHurW8eGraFeWyUe46I0,190
|
|
2
2
|
sql_querystring_builder/abstract_clause.py,sha256=l1dGyhsu-k4QoNU16kXfDxLS4lXc02TJtlaNoUpHJXw,261
|
|
3
3
|
sql_querystring_builder/clauses.py,sha256=G4XCk2ssmUYIQBctTle_tz6qwZ946jmL62dFqgz-ZsQ,5294
|
|
4
|
+
sql_querystring_builder/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
5
|
sql_querystring_builder/query_builder.py,sha256=n9kkifkAXTJos--T2wlGcsqA9xIXRzYa-SjPPpi0qxk,1601
|
|
5
6
|
sql_querystring_builder/tables.py,sha256=e_FFuc44o4ZAkM3iy37f61ddPp7xdGBiBgsOmMCIv6A,8831
|
|
6
|
-
sql_querystring_builder-0.1.
|
|
7
|
-
sql_querystring_builder-0.1.
|
|
8
|
-
sql_querystring_builder-0.1.
|
|
9
|
-
sql_querystring_builder-0.1.
|
|
10
|
-
sql_querystring_builder-0.1.
|
|
7
|
+
sql_querystring_builder-0.1.1.dist-info/licenses/LICENSE,sha256=IwGE9guuL-ryRPEKi6wFPI_zOhg7zDZbTYuHbSt_SAk,35823
|
|
8
|
+
sql_querystring_builder-0.1.1.dist-info/METADATA,sha256=5wVbwJqPLg8QFLh1uU940n4HcEUebqQMdgJfz8GN5_E,6053
|
|
9
|
+
sql_querystring_builder-0.1.1.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
10
|
+
sql_querystring_builder-0.1.1.dist-info/top_level.txt,sha256=U1YNBUlpIiidNaXjnScKqzNgTNVIhucoRPG3f287txU,24
|
|
11
|
+
sql_querystring_builder-0.1.1.dist-info/RECORD,,
|
|
File without changes
|
{sql_querystring_builder-0.1.0.dist-info → sql_querystring_builder-0.1.1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{sql_querystring_builder-0.1.0.dist-info → sql_querystring_builder-0.1.1.dist-info}/top_level.txt
RENAMED
|
File without changes
|