Coverage for mindsdb / integrations / handlers / surrealdb_handler / utils / surreal_get_info.py: 0%
17 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
1def table_names(connection):
2 query = "INFO for DB"
3 dict_1 = connection.query(query)
4 dict_2 = dict_1['tb']
5 tables = list(dict_2.keys())
6 return tables
9def column_info(connection, table):
10 query = "INFO FOR TABLE " + table
11 dict_1 = connection.query(query)
12 dict_2 = dict_1['fd']
13 columns = list(dict_2.keys())
14 types = []
16 for value in dict_2.values():
17 a = value.split('TYPE ', 1)[1]
18 type = a.split()[0]
19 types.append(type)
20 return columns, types