Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /MTSWebServices_syncmaster /syncmaster /schemas /v1 /connections /mssql.py
| # SPDX-FileCopyrightText: 2023-present MTS PJSC | |
| # SPDX-License-Identifier: Apache-2.0 | |
| from pydantic import BaseModel, Field | |
| from syncmaster.schemas.v1.auth import ( | |
| CreateBasicAuthSchema, | |
| ReadBasicAuthSchema, | |
| UpdateBasicAuthSchema, | |
| ) | |
| from syncmaster.schemas.v1.connection_types import MSSQL_TYPE | |
| from syncmaster.schemas.v1.connections.connection_base import ( | |
| CreateConnectionBaseSchema, | |
| ReadConnectionBaseSchema, | |
| ) | |
| class MSSQLConnectionDataSchema(BaseModel): | |
| host: str | |
| port: int = Field(default=1433, gt=0, le=65535) | |
| database_name: str | |
| additional_params: dict = Field(default_factory=dict) | |
| class CreateMSSQLConnectionSchema(CreateConnectionBaseSchema): | |
| type: MSSQL_TYPE = Field(description="Connection type") | |
| data: MSSQLConnectionDataSchema = Field( | |
| alias="connection_data", | |
| description="Data required to connect to the database", | |
| ) | |
| auth_data: CreateBasicAuthSchema = Field( | |
| description="Credentials for authorization", | |
| ) | |
| class ReadMSSQLConnectionSchema(ReadConnectionBaseSchema): | |
| type: MSSQL_TYPE = Field(description="Connection type") | |
| data: MSSQLConnectionDataSchema = Field( | |
| alias="connection_data", | |
| description="Data required to connect to the remote server", | |
| ) | |
| auth_data: ReadBasicAuthSchema | None = Field( | |
| default=None, | |
| description="Credentials for authorization", | |
| ) | |
| class UpdateMSSQLConnectionSchema(CreateMSSQLConnectionSchema): | |
| auth_data: UpdateBasicAuthSchema = Field( | |
| description="Credentials for authorization", | |
| ) | |
Xet Storage Details
- Size:
- 1.59 kB
- Xet hash:
- 3e962d65e03053d8300370111e6f09e741510071db106f33bb579e6f7ba001ef
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.