Coverage for mindsdb / integrations / handlers / yugabyte_handler / yugabyte_handler.py: 0%
9 statements
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
« prev ^ index » next coverage.py v7.13.1, created at 2026-01-21 00:36 +0000
1from collections import OrderedDict
3from mindsdb.integrations.handlers.postgres_handler.postgres_handler import (
4 PostgresHandler,
5)
6from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE as ARG_TYPE
9class YugabyteHandler(PostgresHandler):
10 """
11 This handler handles connection and execution of the YugabyteSQL statements.
12 """
14 name = 'yugabyte'
16 def __init__(self, name, **kwargs):
17 super().__init__(name, **kwargs)
20connection_args = OrderedDict(
21 host={
22 'type': ARG_TYPE.STR,
23 'description': 'The host name or IP address of the YugabyteDB server/database.',
24 },
25 user={
26 'type': ARG_TYPE.STR,
27 'description': 'The user name used to authenticate with the YugabyteDB server.',
28 },
29 password={
30 'type': ARG_TYPE.STR,
31 'description': 'The password to authenticate the user with the YugabyteDB server.',
32 },
33 port={
34 'type': ARG_TYPE.INT,
35 'description': 'Specify port to connect YugabyteDB server',
36 },
37 database={
38 'type': ARG_TYPE.STR,
39 'description': 'Specify database name to connect YugabyteDB server',
40 },
41 schema={
42 'type': ARG_TYPE.STR,
43 'description': '(OPTIONAL) comma seperated value of schema to be considered while querying',
44 },
45 sslmode={
46 'type': ARG_TYPE.STR,
47 'description': ''' (OPTIONAL) Specifies the SSL mode for the connection, determining whether to use SSL encryption and the level of verification required
48 (e.g., "**disable**", "**allow**", "**prefer**", "**require**", "**verify-ca**", "**verify-full**")''',
49 },
50)
52connection_args_example = OrderedDict(
53 host='127.0.0.1', port=5433, password='', user='admin', database='yugabyte'
54)