Coverage for mindsdb / integrations / handlers / oceanbase_handler / oceanbase_handler.py: 0%

9 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-21 00:36 +0000

1from mindsdb.integrations.libs.const import HANDLER_CONNECTION_ARG_TYPE as ARG_TYPE 

2from collections import OrderedDict 

3 

4 

5from mindsdb.integrations.handlers.mysql_handler import Handler as MysqlHandler 

6 

7 

8class OceanBaseHandler(MysqlHandler): 

9 """ 

10 This handler handles connection and execution of the OceanBase statements. 

11 """ 

12 name = 'oceanbase' 

13 

14 def __init__(self, name, **kwargs): 

15 super().__init__(name, **kwargs) 

16 

17 

18connection_args = OrderedDict( 

19 user={ 

20 'type': ARG_TYPE.STR, 

21 'description': 'The user name used to authenticate with the OceanBase server.' 

22 }, 

23 password={ 

24 'type': ARG_TYPE.STR, 

25 'description': 'The password to authenticate the user with the OceanBase server.' 

26 }, 

27 database={ 

28 'type': ARG_TYPE.STR, 

29 'description': 'The database name to use when connecting with the OceanBase server.' 

30 }, 

31 host={ 

32 'type': ARG_TYPE.STR, 

33 'description': 'The host name or IP address of the OceanBase server. ' 

34 }, 

35 port={ 

36 'type': ARG_TYPE.INT, 

37 'description': 'The TCP/IP port of the OceanBase server. Must be an integer.' 

38 } 

39) 

40 

41connection_args_example = OrderedDict( 

42 host='localhost', 

43 port=9030, 

44 user='root', 

45 password='', 

46 database='test' 

47)