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

Method serialise_value

src/ifcpatch/ifcpatch/recipes/Ifc2Sql.py:626–631  ·  view source on GitHub ↗
(self, element: ifcopenshell.entity_instance, value: Any)

Source from the content-addressed store, hash-verified

624 self.c.executemany("INSERT INTO psets VALUES (%s, %s, %s, %s);", pset_rows)
625
626 def serialise_value(self, element: ifcopenshell.entity_instance, value: Any) -> Any:
627 return element.walk(
628 lambda v: isinstance(v, ifcopenshell.entity_instance),
629 lambda v: v.id() if v.id() else {"type": v.is_a(), "value": v.wrappedValue},
630 value,
631 )
632
633 def get_permutations(self, lst: list[Any], indexes: list[int]) -> list[Any]:
634 """

Callers 1

insert_dataMethod · 0.95

Calls 3

walkMethod · 0.80
idMethod · 0.45
is_aMethod · 0.45

Tested by

no test coverage detected