Coverage for mindsdb / integrations / handlers / oracle_handler / connection_args.py: 100%

4 statements  

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

1from collections import OrderedDict 

2 

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

4 

5 

6connection_args = OrderedDict( 

7 dsn={ 

8 "type": ARG_TYPE.STR, 

9 "description": "The data source name (DSN) for the Oracle database.", 

10 "required": False, 

11 "label": "Data Source Name (DSN)", 

12 }, 

13 host={ 

14 "type": ARG_TYPE.STR, 

15 "description": "The hostname, IP address, or URL of the Oracle server.", 

16 "required": False, 

17 "label": "Host", 

18 }, 

19 port={ 

20 "type": ARG_TYPE.INT, 

21 "description": "The port number for connecting to the Oracle database. Default is 1521.", 

22 "required": False, 

23 "label": "Port", 

24 }, 

25 sid={ 

26 "type": ARG_TYPE.STR, 

27 "description": "The system identifier (SID) of the Oracle database.", 

28 "required": False, 

29 "label": "SID", 

30 }, 

31 service_name={ 

32 "type": ARG_TYPE.STR, 

33 "description": "The service name of the Oracle database.", 

34 "required": False, 

35 "label": "Service Name", 

36 }, 

37 user={ 

38 "type": ARG_TYPE.STR, 

39 "description": "The username for the Oracle database.", 

40 "required": True, 

41 "label": "User", 

42 }, 

43 password={ 

44 "type": ARG_TYPE.PWD, 

45 "description": "The password for the Oracle database.", 

46 "secret": True, 

47 "required": True, 

48 "label": "Password", 

49 }, 

50 disable_oob={ 

51 "type": ARG_TYPE.BOOL, 

52 "description": "The boolean parameter to disable out-of-band breaks. Default is `false`.", 

53 "required": False, 

54 "label": "Disable OOB", 

55 }, 

56 auth_mode={ 

57 "type": ARG_TYPE.STR, 

58 "description": "The authorization mode to use.", 

59 "required": False, 

60 "label": "Auth Mode", 

61 }, 

62 thick_mode={ 

63 "type": ARG_TYPE.BOOL, 

64 "description": "Set to `true` to use thick mode for the connection. Thin mode is used by default.", 

65 "required": False, 

66 "label": "Connection mode", 

67 }, 

68 oracle_client_lib_dir={ 

69 "type": ARG_TYPE.STR, 

70 "description": "The directory path where Oracle client libraries are located. Required if using thick mode.", 

71 "required": False, 

72 "label": "Oracle Client Library Directory", 

73 }, 

74) 

75 

76connection_args_example = OrderedDict( 

77 host="127.0.0.1", 

78 port=1521, 

79 user="admin", 

80 password="password", 

81 sid="ORCL", 

82)