MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / get_json

Method get_json

src/ifc4d/ifc4d/pp2ifc.py:49–52  ·  view source on GitHub ↗
(self, table_name: str)

Source from the content-addressed store, hash-verified

47 self.relationship_map = {0: "FINISH_START", 1: "FINISH_FINISH", 2: "START_START", 3: "START_FINISH"}
48
49 def get_json(self, table_name: str) -> list[dict[str, Any]]:
50 self.cur.execute("select * from " + table_name)
51 r = [dict((self.cur.description[i][0], value) for i, value in enumerate(row)) for row in self.cur.fetchall()]
52 return r
53
54 def get_json_with_filter(self, table_name: str, attr_name: str, attr_value: Any) -> list[dict[str, Any]]:
55 self.cur.execute("select * from " + table_name + " where " + attr_name + " = " + str(attr_value))

Callers 4

parse_ppMethod · 0.95
parse_calendar_ppMethod · 0.95
parse_barMethod · 0.95
parse_relationship_ppMethod · 0.95

Calls 1

executeMethod · 0.45

Tested by

no test coverage detected