Skip to content

Commit 8a853f5

Browse files
docs: update domain types to include new time only type
also added context around which implementation support given backend implementations as time only works on duckdb solution atm
1 parent 963a377 commit 8a853f5

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

docs/detailed_guidance/domain_types.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@ Domain types are custom defined pydantic types that solve common problems with u
44
This might include Postcodes, NHS Numbers, dates with specific formats etc.
55

66
Below is a list of defined types, their output type and any contraints. Nested beneath them are any constraints that area allowed and their default values if there are any.
7-
| Defined Type | Output Type | Contraints & Defaults |
8-
| ------------ | ----------- | --------------------- |
9-
| NHSNumber | str |
10-
| permissive_nhs_number | str | <li> warn_on_test_numbers = False </li> |
11-
| Postcode | str |
12-
| OrgId | str |
13-
| conformatteddate | date | <li>date_format: str</li><li>ge: date</li><li>le: date</li><li>gt: date</li><li>lt: date</li> |
14-
| formatteddatetime | datetime | <li>date_format: str </li><li>timezone_treatment: one_of ["forbid", "permit", "require] = "permit"</li> |
15-
| reportingperiod | date | <li>reporting_period_type: one_of ["start", "end"]</li><li>date_format: str = "%Y-%m-%d"</li> |
16-
| alphanumeric | str | <li>min_digits : NonNegativeInt = 1</li><li>max_digits: PositiveInt = 1</li> |
17-
| identifier | str | <li>min_digits : NonNegativeInt = 1</li><li>max_digits: PositiveInt = 1</li>
7+
| Defined Type | Output Type | Contraints & Defaults | Supported Implementations |
8+
| ------------ | ----------- | --------------------- | ------------------------- |
9+
| NHSNumber | str | | Spark, DuckDB |
10+
| permissive_nhs_number | str | <li> warn_on_test_numbers = False </li> | Spark, DuckDB |
11+
| Postcode | str | | Spark, DuckDB |
12+
| OrgId | str | | Spark, DuckDB |
13+
| conformatteddate | date | <li>date_format: str</li><li>ge: date</li><li>le: date</li><li>gt: date</li><li>lt: date</li> | Spark, DuckDB |
14+
| formatteddatetime | datetime | <li>date_format: str </li><li>timezone_treatment: one_of ["forbid", "permit", "require] = "permit"</li> | Spark, DuckDB |
15+
| formattedtime | time | <li>time_format: str </li><li>timezone_treatment: one_of ["forbid", "permit", "require"] = "permit" | DuckDB |
16+
| reportingperiod | date | <li>reporting_period_type: one_of ["start", "end"]</li><li>date_format: str = "%Y-%m-%d"</li> | Spark, DuckDB |
17+
| alphanumeric | str | <li>min_digits : NonNegativeInt = 1</li><li>max_digits: PositiveInt = 1</li> | Spark, DuckDB |
18+
| identifier | str | <li>min_digits : NonNegativeInt = 1</li><li>max_digits: PositiveInt = 1</li> | Spark, DuckDB |
1819

19-
Other types that are allowed include:
20+
**Other types that are allowed include:**
2021
- str
2122
- int
2223
- date
2324
- datetime
2425
- Decimal
2526
- float
26-
27-
And any types that are included in [pydantic version 1.10](https://docs.pydantic.dev/1.10/usage/types/#pydantic-types)
27+
- Any types that are included in [pydantic version 1.10](https://docs.pydantic.dev/1.10/usage/types/#pydantic-types)

0 commit comments

Comments
 (0)