database-wrapper-mssql 0.1.33__tar.gz → 0.1.38__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: database_wrapper_mssql
3
- Version: 0.1.33
3
+ Version: 0.1.38
4
4
  Summary: database_wrapper for MSSQL database
5
5
  Author-email: Gints Murans <gm@gm.lv>
6
6
  License: GNU General Public License v3.0 (GPL-3.0)
@@ -32,10 +32,10 @@ Classifier: Topic :: Software Development
32
32
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
33
33
  Requires-Python: >=3.8
34
34
  Description-Content-Type: text/markdown
35
- Requires-Dist: database_wrapper==0.1.33
35
+ Requires-Dist: database_wrapper==0.1.38
36
36
  Requires-Dist: pymssql>=2.2.10
37
37
 
38
- # database_wrapper
38
+ # database_wrapper_mssql
39
39
 
40
40
  _Part of the `database_wrapper` package._
41
41
 
@@ -1,4 +1,4 @@
1
- # database_wrapper
1
+ # database_wrapper_mssql
2
2
 
3
3
  _Part of the `database_wrapper` package._
4
4
 
@@ -24,9 +24,10 @@ class DBWrapperMSSQL(DBWrapper):
24
24
  #######################
25
25
 
26
26
  # Meta methods
27
+ # We are overriding the __init__ method for the type hinting
27
28
  def __init__(
28
29
  self,
29
- db: MSSQL,
30
+ db: MSSQL | None = None,
30
31
  dbConn: MssqlConnection | None = None,
31
32
  logger: logging.Logger | None = None,
32
33
  ):
@@ -63,7 +64,9 @@ class DBWrapperMSSQL(DBWrapper):
63
64
  ### Query methods ###
64
65
  #####################
65
66
 
66
- def limitQuery(self, offset: int = 0, limit: int = 100) -> str:
67
+ def limitQuery(self, offset: int = 0, limit: int = 100) -> str | None:
68
+ if limit == 0:
69
+ return None
67
70
  return f"""
68
71
  OFFSET {offset} ROWS
69
72
  FETCH NEXT {limit} ROWS ONLY
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: database_wrapper_mssql
3
- Version: 0.1.33
3
+ Version: 0.1.38
4
4
  Summary: database_wrapper for MSSQL database
5
5
  Author-email: Gints Murans <gm@gm.lv>
6
6
  License: GNU General Public License v3.0 (GPL-3.0)
@@ -32,10 +32,10 @@ Classifier: Topic :: Software Development
32
32
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
33
33
  Requires-Python: >=3.8
34
34
  Description-Content-Type: text/markdown
35
- Requires-Dist: database_wrapper==0.1.33
35
+ Requires-Dist: database_wrapper==0.1.38
36
36
  Requires-Dist: pymssql>=2.2.10
37
37
 
38
- # database_wrapper
38
+ # database_wrapper_mssql
39
39
 
40
40
  _Part of the `database_wrapper` package._
41
41
 
@@ -0,0 +1,2 @@
1
+ database_wrapper==0.1.38
2
+ pymssql>=2.2.10
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "database_wrapper_mssql"
7
- version = "0.1.33"
7
+ version = "0.1.38"
8
8
  description = "database_wrapper for MSSQL database"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -35,7 +35,7 @@ classifiers = [
35
35
  ]
36
36
  keywords = ["database", "wrapper", "python", "mssql", "sqlserver"]
37
37
  dependencies = [
38
- "database_wrapper == 0.1.33",
38
+ "database_wrapper == 0.1.38",
39
39
  "pymssql >= 2.2.10",
40
40
  ]
41
41
 
@@ -1,2 +0,0 @@
1
- database_wrapper==0.1.33
2
- pymssql>=2.2.10