sql_querystring_builder 0.1.0__tar.gz → 0.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.
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/PKG-INFO +24 -8
- sql_querystring_builder-0.1.0/src/sql_querystring_builder.egg-info/PKG-INFO → sql_querystring_builder-0.1.1/README.md +17 -22
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/pyproject.toml +9 -2
- sql_querystring_builder-0.1.1/src/sql_querystring_builder/py.typed +0 -0
- sql_querystring_builder-0.1.0/README.md → sql_querystring_builder-0.1.1/src/sql_querystring_builder.egg-info/PKG-INFO +38 -8
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/src/sql_querystring_builder.egg-info/SOURCES.txt +1 -0
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/LICENSE +0 -0
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/setup.cfg +0 -0
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/src/sql_querystring_builder/__init__.py +0 -0
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/src/sql_querystring_builder/abstract_clause.py +0 -0
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/src/sql_querystring_builder/clauses.py +0 -0
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/src/sql_querystring_builder/query_builder.py +0 -0
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/src/sql_querystring_builder/tables.py +0 -0
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/src/sql_querystring_builder.egg-info/dependency_links.txt +0 -0
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/src/sql_querystring_builder.egg-info/top_level.txt +0 -0
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/tests/test_characterization.py +0 -0
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/tests/test_clauses.py +0 -0
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/tests/test_queries.py +0 -0
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/tests/test_readme.py +0 -0
- {sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/tests/test_tables.py +0 -0
|
@@ -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,17 +1,3 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: sql_querystring_builder
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: Wraps string building of MS SQL queries
|
|
5
|
-
Author-email: Wael GRIBAA <g.wael@outlook.fr>
|
|
6
|
-
License-Expression: GPL-3.0-only
|
|
7
|
-
Keywords: sql,query,string
|
|
8
|
-
Classifier: Programming Language :: Python :: 3
|
|
9
|
-
Classifier: Operating System :: OS Independent
|
|
10
|
-
Requires-Python: >=3.10
|
|
11
|
-
Description-Content-Type: text/markdown
|
|
12
|
-
License-File: LICENSE
|
|
13
|
-
Dynamic: license-file
|
|
14
|
-
|
|
15
1
|
# SqlQueryBuilder
|
|
16
2
|
Wraps string building of MS SQL queries.
|
|
17
3
|
It provides first level validation.
|
|
@@ -35,14 +21,17 @@ It provides first level validation.
|
|
|
35
21
|
- [x] Field aliases
|
|
36
22
|
|
|
37
23
|
## Not implemented (yet)
|
|
38
|
-
|
|
39
|
-
- [ ]
|
|
40
|
-
- [ ]
|
|
41
|
-
- [ ]
|
|
24
|
+
In planned order:
|
|
25
|
+
- [ ] LEFT, RIGHT, FULL and CROSS joins; SELECT DISTINCT and TOP; paging (OFFSET/FETCH)
|
|
26
|
+
- [ ] Proper conditions: typed values, AND/OR/NOT, IN, BETWEEN, LIKE, IS NULL
|
|
27
|
+
- [ ] Insert and Delete
|
|
28
|
+
- [ ] Functions (aggregates and others), GROUP BY, HAVING, CASE
|
|
29
|
+
- [ ] Compound queries (UNION, INTERSECT, EXCEPT) and sub-queries
|
|
30
|
+
- [ ] Parameterized queries
|
|
42
31
|
|
|
43
32
|
## What it does not do
|
|
44
33
|
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
|
|
34
|
+
It gives you the query as a string, it's then up to you to pass it to a SQL engine.
|
|
46
35
|
|
|
47
36
|
## Example
|
|
48
37
|
1. Define the elements of your query:
|
|
@@ -55,7 +44,7 @@ accounts_table = Table("Accounts", "acc").add("id", "customerId", "accountId")
|
|
|
55
44
|
select = Select(customers_table, accounts_table.fields.accountId)
|
|
56
45
|
# Sets an alias for an existing field
|
|
57
46
|
customers_table.fields.customerId.set_alias("cid")
|
|
58
|
-
# Specifies the table to
|
|
47
|
+
# Specifies the table to take as a FROM
|
|
59
48
|
from_ = From(customers_table)
|
|
60
49
|
# Specifies a temporary table for the select
|
|
61
50
|
atemptable = select.to_temptable("a_temp_table")
|
|
@@ -90,7 +79,7 @@ print(query_str)
|
|
|
90
79
|
# > WHERE acc.accountId gt 20000 AND Customers.customerId LIKE 'A1C%'
|
|
91
80
|
# > ORDER BY cid DESC
|
|
92
81
|
```
|
|
93
|
-
4. Manipulate temporary tables
|
|
82
|
+
4. Manipulate temporary tables whose components are inferred:
|
|
94
83
|
```
|
|
95
84
|
# Is able to infer fields from temporary tables and use it as with a regular table.
|
|
96
85
|
temp_select = Select(atemptable)
|
|
@@ -118,6 +107,12 @@ Python 3.10 and above.
|
|
|
118
107
|
(None)
|
|
119
108
|
|
|
120
109
|
## Changelog
|
|
110
|
+
### 0.1.1
|
|
111
|
+
No change to the generated SQL.
|
|
112
|
+
- The package ships a `py.typed` marker, so type checkers such as mypy now use its type hints.
|
|
113
|
+
- PyPI classifiers for the supported Python versions (3.10 to 3.14), typing and topic.
|
|
114
|
+
- The "Not implemented (yet)" list shows the planned features in order; typo fixes.
|
|
115
|
+
|
|
121
116
|
### 0.1.0
|
|
122
117
|
This release changes the generated SQL: check your queries when upgrading.
|
|
123
118
|
- WHERE conditions and the right side of `INNER JOIN ... on` use the field's qualified name (`t1.KeyId`)
|
|
@@ -136,4 +131,4 @@ This release changes the generated SQL: check your queries when upgrading.
|
|
|
136
131
|
## Authors
|
|
137
132
|
Wael GRIBAA
|
|
138
133
|
Contact: g.wael@outlook.fr
|
|
139
|
-
Made in September 2024
|
|
134
|
+
Made in September 2024
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "sql_querystring_builder"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.1"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="Wael GRIBAA", email="g.wael@outlook.fr" },
|
|
10
10
|
]
|
|
@@ -15,7 +15,14 @@ license = "GPL-3.0-only"
|
|
|
15
15
|
license-files = ["LICENSE"]
|
|
16
16
|
classifiers = [
|
|
17
17
|
"Programming Language :: Python :: 3",
|
|
18
|
-
"
|
|
18
|
+
"Programming Language :: Python :: 3.10",
|
|
19
|
+
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
"Programming Language :: Python :: 3.13",
|
|
22
|
+
"Programming Language :: Python :: 3.14",
|
|
23
|
+
"Operating System :: OS Independent",
|
|
24
|
+
"Topic :: Database",
|
|
25
|
+
"Typing :: Typed",
|
|
19
26
|
]
|
|
20
27
|
keywords = ["sql", "query", "string"]
|
|
21
28
|
|
|
File without changes
|
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sql_querystring_builder
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Wraps string building of MS SQL queries
|
|
5
|
+
Author-email: Wael GRIBAA <g.wael@outlook.fr>
|
|
6
|
+
License-Expression: GPL-3.0-only
|
|
7
|
+
Keywords: sql,query,string
|
|
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
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Topic :: Database
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Dynamic: license-file
|
|
21
|
+
|
|
1
22
|
# SqlQueryBuilder
|
|
2
23
|
Wraps string building of MS SQL queries.
|
|
3
24
|
It provides first level validation.
|
|
@@ -21,14 +42,17 @@ It provides first level validation.
|
|
|
21
42
|
- [x] Field aliases
|
|
22
43
|
|
|
23
44
|
## Not implemented (yet)
|
|
24
|
-
|
|
25
|
-
- [ ]
|
|
26
|
-
- [ ]
|
|
27
|
-
- [ ]
|
|
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
|
|
28
52
|
|
|
29
53
|
## What it does not do
|
|
30
54
|
Connect to a database server and run the queries by itself.
|
|
31
|
-
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.
|
|
32
56
|
|
|
33
57
|
## Example
|
|
34
58
|
1. Define the elements of your query:
|
|
@@ -41,7 +65,7 @@ accounts_table = Table("Accounts", "acc").add("id", "customerId", "accountId")
|
|
|
41
65
|
select = Select(customers_table, accounts_table.fields.accountId)
|
|
42
66
|
# Sets an alias for an existing field
|
|
43
67
|
customers_table.fields.customerId.set_alias("cid")
|
|
44
|
-
# Specifies the table to
|
|
68
|
+
# Specifies the table to take as a FROM
|
|
45
69
|
from_ = From(customers_table)
|
|
46
70
|
# Specifies a temporary table for the select
|
|
47
71
|
atemptable = select.to_temptable("a_temp_table")
|
|
@@ -76,7 +100,7 @@ print(query_str)
|
|
|
76
100
|
# > WHERE acc.accountId gt 20000 AND Customers.customerId LIKE 'A1C%'
|
|
77
101
|
# > ORDER BY cid DESC
|
|
78
102
|
```
|
|
79
|
-
4. Manipulate temporary tables
|
|
103
|
+
4. Manipulate temporary tables whose components are inferred:
|
|
80
104
|
```
|
|
81
105
|
# Is able to infer fields from temporary tables and use it as with a regular table.
|
|
82
106
|
temp_select = Select(atemptable)
|
|
@@ -104,6 +128,12 @@ Python 3.10 and above.
|
|
|
104
128
|
(None)
|
|
105
129
|
|
|
106
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
|
+
|
|
107
137
|
### 0.1.0
|
|
108
138
|
This release changes the generated SQL: check your queries when upgrading.
|
|
109
139
|
- WHERE conditions and the right side of `INNER JOIN ... on` use the field's qualified name (`t1.KeyId`)
|
|
@@ -122,4 +152,4 @@ This release changes the generated SQL: check your queries when upgrading.
|
|
|
122
152
|
## Authors
|
|
123
153
|
Wael GRIBAA
|
|
124
154
|
Contact: g.wael@outlook.fr
|
|
125
|
-
Made in September 2024
|
|
155
|
+
Made in September 2024
|
|
@@ -4,6 +4,7 @@ pyproject.toml
|
|
|
4
4
|
src/sql_querystring_builder/__init__.py
|
|
5
5
|
src/sql_querystring_builder/abstract_clause.py
|
|
6
6
|
src/sql_querystring_builder/clauses.py
|
|
7
|
+
src/sql_querystring_builder/py.typed
|
|
7
8
|
src/sql_querystring_builder/query_builder.py
|
|
8
9
|
src/sql_querystring_builder/tables.py
|
|
9
10
|
src/sql_querystring_builder.egg-info/PKG-INFO
|
|
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
|
{sql_querystring_builder-0.1.0 → sql_querystring_builder-0.1.1}/tests/test_characterization.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|