class ExecuteStatementRequests(BaseModel): resourceArn: str secretArn: str sql: str database: Optional[str] continueAfterTimeout: Optional[bool] includeResultMetadata: bool = False parameters: Optional[List[SqlParameter]] schema_: Optional[str] = Field_(None, alias='schema') transactionId: Optional[str]
class ColumnMetadata(BaseModel): arrayBaseColumnType: Optional[int] isAutoIncrement: Optional[bool] isCaseSensitive: Optional[bool] isCurrency: Optional[bool] isSigned: Optional[bool] label: Optional[str] name: Optional[str] nullable: Optional[int] precision: Optional[int] scale: Optional[int] schema_: Optional[str] = Field_(None, alias='schema') tableName: Optional[str] type: Optional[int] typeName: Optional[str]
class SqlParameter(BaseModel): name: str value: Field type_hint: Optional[str] = Field_(None, alias='typeHint') @property def valid_value(self: SqlParameter) -> Union[Union[None, Decimal, datetime], Any]: for key, value in self.value.dict(exclude_unset=True).items(): if key == 'isNull' and value: return None if key == 'stringValue' and self.type_hint: TYPE_HINT_TO_CONVERTER[self.type_hint](value) # only validation return value return None
class ExecuteStatementRequests(BaseModel): resourceArn: str secretArn: str sql: str database: Optional[str] continueAfterTimeout: Optional[bool] includeResultMetadata: bool = False parameters: Optional[List[SqlParameter]] schema_: Optional[str] = Field_(None, alias='schema') transactionId: Optional[str] @validator('transactionId', pre=True) def validate_transaction_id(cls, v: Any) -> Any: if not v: return None return v
class ExecuteSqlRequest(BaseModel): awsSecretStoreArn: str dbClusterOrInstanceArn: str sqlStatements: str database: Optional[str] schema_: Optional[str] = Field_(None, alias='schema')
class BeginTransactionRequest(BaseModel): resourceArn: str secretArn: str schema_: Optional[str] = Field_(None, alias='schema') database: Optional[str]