database-wrapper-mssql 0.1.32__tar.gz → 0.1.37__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.32
3
+ Version: 0.1.37
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.32
35
+ Requires-Dist: database_wrapper==0.1.37
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
 
@@ -14,12 +14,17 @@ class DBWrapperMSSQL(DBWrapper):
14
14
 
15
15
  # Override db instance
16
16
  db: MSSQL
17
+ """ MSSQL database connector """
18
+
19
+ dbConn: MssqlConnection | None = None
20
+ """ MsSQL connection object """
17
21
 
18
22
  #######################
19
23
  ### Class lifecycle ###
20
24
  #######################
21
25
 
22
26
  # Meta methods
27
+ # We are overriding the __init__ method for the type hinting
23
28
  def __init__(
24
29
  self,
25
30
  db: MSSQL,
@@ -30,7 +35,8 @@ class DBWrapperMSSQL(DBWrapper):
30
35
  Initializes a new instance of the DBWrapper class.
31
36
 
32
37
  Args:
33
- db (MSSQL): The MSSQL object.
38
+ db (MSSQL): The MSSQL connector.
39
+ dbConn (MssqlConnection, optional): The MSSQL connection object. Defaults to None.
34
40
  logger (logging.Logger, optional): The logger object. Defaults to None.
35
41
  """
36
42
  super().__init__(db, dbConn, logger)
@@ -58,7 +64,9 @@ class DBWrapperMSSQL(DBWrapper):
58
64
  ### Query methods ###
59
65
  #####################
60
66
 
61
- 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
62
70
  return f"""
63
71
  OFFSET {offset} ROWS
64
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.32
3
+ Version: 0.1.37
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.32
35
+ Requires-Dist: database_wrapper==0.1.37
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.37
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.32"
7
+ version = "0.1.37"
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.32",
38
+ "database_wrapper == 0.1.37",
39
39
  "pymssql >= 2.2.10",
40
40
  ]
41
41
 
@@ -1,2 +0,0 @@
1
- database_wrapper==0.1.32
2
- pymssql>=2.2.10