macss-modular-api-sqlserver 0.4.7__py3-none-any.whl → 0.6.0__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.
- {macss_modular_api_sqlserver-0.4.7.dist-info → macss_modular_api_sqlserver-0.6.0.dist-info}/METADATA +5 -3
- macss_modular_api_sqlserver-0.6.0.dist-info/RECORD +6 -0
- modular_api_sqlserver/__init__.py +6 -0
- modular_api_sqlserver/db_client.py +42 -0
- macss_modular_api_sqlserver-0.4.7.dist-info/RECORD +0 -6
- {macss_modular_api_sqlserver-0.4.7.dist-info → macss_modular_api_sqlserver-0.6.0.dist-info}/WHEEL +0 -0
- {macss_modular_api_sqlserver-0.4.7.dist-info → macss_modular_api_sqlserver-0.6.0.dist-info}/top_level.txt +0 -0
{macss_modular_api_sqlserver-0.4.7.dist-info → macss_modular_api_sqlserver-0.6.0.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: macss-modular-api-sqlserver
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: Official MACSS SQL Server integration package for Python.
|
|
5
5
|
Author: ccisne.dev
|
|
6
6
|
License-Expression: MIT
|
|
@@ -56,10 +56,12 @@ else:
|
|
|
56
56
|
|
|
57
57
|
See [example/example.py](example/example.py) for a complete in-memory wiring sample.
|
|
58
58
|
|
|
59
|
-
##
|
|
59
|
+
## What this package provides
|
|
60
60
|
|
|
61
61
|
- normalized SQL Server connection defaults and redacted summaries
|
|
62
62
|
- engine-agnostic `DbClient`, `DbRepository`, and transaction contracts
|
|
63
63
|
- explicit lease ownership semantics for package-owned and application-owned sessions
|
|
64
64
|
- health contributor and GraphQL support bundle for higher-level integrations
|
|
65
|
-
-
|
|
65
|
+
- the application supplies the driver binding (adapter) for its chosen engine and driver
|
|
66
|
+
|
|
67
|
+
This package is **contracts-only by design** and will never ship a driver binding; you choose your engine and driver and provide the adapter. See [ADR-0004](../../../docs/adr/0004-contracts-only-database-packages.md).
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
modular_api_sqlserver/__init__.py,sha256=m-ExxV6JLGD41Gx1nodhzLcevLdqDYMbBz08hU26q_0,1230
|
|
2
|
+
modular_api_sqlserver/db_client.py,sha256=KhF0HYsHHGeg3HxAastZJc5p5mY88r4MO7YBlrJeS9c,14355
|
|
3
|
+
macss_modular_api_sqlserver-0.6.0.dist-info/METADATA,sha256=_AXCyo20lOoux3FTVhjTSAWSnetPvm5w0sbcI5gqEhk,2460
|
|
4
|
+
macss_modular_api_sqlserver-0.6.0.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
5
|
+
macss_modular_api_sqlserver-0.6.0.dist-info/top_level.txt,sha256=n0TFMe-mbowNietmYzSthEnQ-gmZLPXaLJ6h0HhuX84,22
|
|
6
|
+
macss_modular_api_sqlserver-0.6.0.dist-info/RECORD,,
|
|
@@ -14,6 +14,9 @@ from .db_client import (
|
|
|
14
14
|
DbHealthContributor,
|
|
15
15
|
DbHealthReport,
|
|
16
16
|
DbHealthStatus,
|
|
17
|
+
DbParameter,
|
|
18
|
+
DbParameterDirection,
|
|
19
|
+
DbProcedureOutcome,
|
|
17
20
|
DbProviderDescription,
|
|
18
21
|
DbRepository,
|
|
19
22
|
DbRepositoryContext,
|
|
@@ -40,6 +43,9 @@ __all__ = [
|
|
|
40
43
|
"DbHealthContributor",
|
|
41
44
|
"DbHealthReport",
|
|
42
45
|
"DbHealthStatus",
|
|
46
|
+
"DbParameter",
|
|
47
|
+
"DbParameterDirection",
|
|
48
|
+
"DbProcedureOutcome",
|
|
43
49
|
"DbProviderDescription",
|
|
44
50
|
"DbRepository",
|
|
45
51
|
"DbRepositoryContext",
|
|
@@ -17,6 +17,13 @@ class DbCommandKind(str, Enum):
|
|
|
17
17
|
EXECUTE = "execute"
|
|
18
18
|
BATCH = "batch"
|
|
19
19
|
SCALAR = "scalar"
|
|
20
|
+
PROCEDURE = "procedure"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class DbParameterDirection(str, Enum):
|
|
24
|
+
INPUT = "input"
|
|
25
|
+
OUTPUT = "output"
|
|
26
|
+
INPUT_OUTPUT = "inputOutput"
|
|
20
27
|
|
|
21
28
|
|
|
22
29
|
class DbFailureKind(str, Enum):
|
|
@@ -84,6 +91,39 @@ class DbConnectionSettings:
|
|
|
84
91
|
)
|
|
85
92
|
|
|
86
93
|
|
|
94
|
+
@dataclass(frozen=True, slots=True)
|
|
95
|
+
class DbParameter:
|
|
96
|
+
name: str
|
|
97
|
+
value: object | None = None
|
|
98
|
+
direction: DbParameterDirection = DbParameterDirection.INPUT
|
|
99
|
+
type_hint: str | None = None
|
|
100
|
+
|
|
101
|
+
@classmethod
|
|
102
|
+
def input(cls, name: str, value: object | None, type_hint: str | None = None) -> DbParameter:
|
|
103
|
+
return cls(name=name, value=value, direction=DbParameterDirection.INPUT, type_hint=type_hint)
|
|
104
|
+
|
|
105
|
+
@classmethod
|
|
106
|
+
def output(cls, name: str, type_hint: str | None = None) -> DbParameter:
|
|
107
|
+
return cls(name=name, direction=DbParameterDirection.OUTPUT, type_hint=type_hint)
|
|
108
|
+
|
|
109
|
+
@classmethod
|
|
110
|
+
def input_output(
|
|
111
|
+
cls, name: str, value: object | None, type_hint: str | None = None
|
|
112
|
+
) -> DbParameter:
|
|
113
|
+
return cls(
|
|
114
|
+
name=name,
|
|
115
|
+
value=value,
|
|
116
|
+
direction=DbParameterDirection.INPUT_OUTPUT,
|
|
117
|
+
type_hint=type_hint,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
@dataclass(frozen=True, slots=True)
|
|
122
|
+
class DbProcedureOutcome:
|
|
123
|
+
return_value: object | None = None
|
|
124
|
+
output_parameters: Mapping[str, object] | None = None
|
|
125
|
+
|
|
126
|
+
|
|
87
127
|
@dataclass(frozen=True, slots=True)
|
|
88
128
|
class DbCommand:
|
|
89
129
|
kind: DbCommandKind
|
|
@@ -104,12 +144,14 @@ class DbExecutionMetadata:
|
|
|
104
144
|
class DbRowSet:
|
|
105
145
|
rows: list[Mapping[str, object]]
|
|
106
146
|
metadata: DbExecutionMetadata
|
|
147
|
+
procedure: DbProcedureOutcome | None = None
|
|
107
148
|
|
|
108
149
|
|
|
109
150
|
@dataclass(frozen=True, slots=True)
|
|
110
151
|
class DbExecutionSummary:
|
|
111
152
|
affected_count: int
|
|
112
153
|
metadata: DbExecutionMetadata
|
|
154
|
+
procedure: DbProcedureOutcome | None = None
|
|
113
155
|
|
|
114
156
|
|
|
115
157
|
@dataclass(frozen=True, slots=True)
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
modular_api_sqlserver/__init__.py,sha256=oc7QvcB8Ed6B8jVwzetvRrZBA3hROJs1WrC37bHv5fE,1090
|
|
2
|
-
modular_api_sqlserver/db_client.py,sha256=jVTiw9urV2AGqpg7sQzW-ID3PfUdWxSrMxG-I83pZ_c,13045
|
|
3
|
-
macss_modular_api_sqlserver-0.4.7.dist-info/METADATA,sha256=DWSUnJrI8AFMOPf2969GRZYNuI5_mHE_zYF2nKu6q_M,2208
|
|
4
|
-
macss_modular_api_sqlserver-0.4.7.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
5
|
-
macss_modular_api_sqlserver-0.4.7.dist-info/top_level.txt,sha256=n0TFMe-mbowNietmYzSthEnQ-gmZLPXaLJ6h0HhuX84,22
|
|
6
|
-
macss_modular_api_sqlserver-0.4.7.dist-info/RECORD,,
|
{macss_modular_api_sqlserver-0.4.7.dist-info → macss_modular_api_sqlserver-0.6.0.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|