MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / query_one

Method query_one

misc/python/materialize/mzexplore/sql.py:62–67  ·  view source on GitHub ↗
(self, query: str)

Source from the content-addressed store, hash-verified

60 self.conn.close()
61
62 def query_one(self, query: str) -> dict[Any, Any]:
63 with self.conn.cursor() as cursor:
64 cursor.execute(query)
65 cols = [d[0].lower() for d in cursor.description]
66 row = {key: val for key, val in zip(cols, cursor.fetchone())}
67 return cast(dict[Any, Any], row)
68
69 def query_all(self, query: str) -> DictGenerator:
70 with self.conn.cursor() as cursor:

Callers 3

defsFunction · 0.45
defsFunction · 0.45
explainFunction · 0.45

Calls 3

cursorMethod · 0.80
executeMethod · 0.45
lowerMethod · 0.45

Tested by

no test coverage detected