SQL Connection Model
Smarter API SQL Connection Manifest Constants
Smarter API Manifest - SqlConnection.spec
- class smarter.apps.connection.manifest.models.sql_connection.spec.Connection(*, dbEngine: str, hostname: str, port: int | None = None, database: str, username: str | None = None, password: str | None = None, timeout: int = 30, useSsl: bool = False, sslCert: str | None = None, sslKey: str | None = None, sslCa: str | None = None, proxyHost: str | None = None, proxyPort: int | None = None, proxyUsername: str | None = None, proxyPassword: str | None = None, sshKnownHosts: str | None = None, poolSize: int = 5, maxOverflow: int = 10, authenticationMethod: str = 'none')[source]
Bases:
SmarterBasePydanticModelSmarter API - generic SQL Connection class.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context, /)
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Return type:
- Parameters:
self – The BaseModel instance.
context – The context.
- class smarter.apps.connection.manifest.models.sql_connection.spec.SAMSqlConnectionSpec(*, connection: Connection)[source]
Bases:
AbstractSAMSpecBaseSmarter API Sql Connection Manifest Connection.spec
- connection: Connection
Smarter API SqlConnection Manifest
- class smarter.apps.connection.manifest.models.sql_connection.model.SAMSqlConnection(*, apiVersion: str, kind: str, metadata: SAMConnectionCommonMetadata, spec: SAMSqlConnectionSpec, status: SAMConnectionCommonStatus | None = None)[source]
Bases:
AbstractSAMBaseSmarter API Manifest - SqlConnection Model
- metadata: SAMConnectionCommonMetadata
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'from_attributes': True, 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context, /)
This function is meant to behave like a BaseModel method to initialize private attributes.
It takes context as an argument since that’s what pydantic-core passes when calling it.
- Return type:
- Parameters:
self – The BaseModel instance.
context – The context.
- spec: SAMSqlConnectionSpec
- status: SAMConnectionCommonStatus | None