Coverage for mindsdb / integrations / handlers / timescaledb_handler / timescaledb_handler.py: 100%
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 mindsdb.integrations.handlers.postgres_handler import Handler as PostgresHandler
2from collections import OrderedDict
3from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE as ARG_TYPE
6class TimeScaleDBHandler(PostgresHandler):
7 name = 'timescaledb'
9 def __init__(self, name, **kwargs):
10 super().__init__(name, **kwargs)
13connection_args = OrderedDict(
14 host={
15 'type': ARG_TYPE.STR,
16 'description': 'The host name or IP address of the TimeScaleDB server/database.'
17 },
18 database={
19 'type': ARG_TYPE.STR,
20 'description': """
21 The database name to use when connecting with the TimeScaleDB server.
22 """
23 },
24 user={
25 'type': ARG_TYPE.STR,
26 'description': 'The user name used to authenticate with the TimeScaleDB server.'
27 },
28 password={
29 'type': ARG_TYPE.STR,
30 'description': 'The password to authenticate the user with the TimeScaleDB server.'
31 },
32 schema={
33 'type': ARG_TYPE.STR,
34 'description': 'The schema in which objects are searched first.',
35 'required': False,
36 'label': 'Schema'
37 },
38 port={
39 'type': ARG_TYPE.INT,
40 'description': 'Specify port to connect TimeScaleDB '
41 }
42)
44connection_args_example = OrderedDict(
45 host='127.0.0.1',
46 port=5432,
47 password='password',
48 user='root',
49 database="timescaledb",
50 schema='public'
51)