SQL Microsoft¶
MsSqlHandler(connection_properties, max_retries=3, retry_wait_time=1, skip_connect=False, **kwargs)
¶
Subclass of SqlHandler used for Microsoft SQL Server.
Source code in echo_connhandler/sql_core.py
def __init__(
self,
connection_properties: SqlConnProperties,
max_retries: int = 3,
retry_wait_time: float = 1,
skip_connect: bool = False,
**kwargs, # pylint: disable=unused-argument # noqa
) -> None:
"""Method that initializes the SQL handler.
This already connects to the SQL server.
Parameters
----------
connection_properties : SqlConnProperties
Object containing connection parameters.
max_retries : int, optional
Number of retries that will be attempted when reconnecting or doing queries, by default 3
retry_wait_time : float, optional
Wait time in seconds between each connection or query retry, by default 1
skip_connect : bool, optional
If True, the connection will not be established when the object is created.
If this is set toTrue, the user will need to manually call the reconnect() method when they want to connect to the server.
By default False
**kwargs : dict, optional
Just kept here for compatibility.
"""
super().__init__(
connection_properties=connection_properties,
max_retries=max_retries,
retry_wait_time=retry_wait_time,
skip_connect=skip_connect,
)