MCPcopy Index your code
hub / github.com/idank/explainshell / _oid

Function _oid

tools/migrate_mongo_to_sqlite.py:45–49  ·  view source on GitHub ↗

Extract string from a MongoDB ObjectId dict like {'$oid': '...'}.

(value)

Source from the content-addressed store, hash-verified

43
44
45def _oid(value):
46 """Extract string from a MongoDB ObjectId dict like {'$oid': '...'}."""
47 if isinstance(value, dict) and "$oid" in value:
48 return value["$oid"]
49 return str(value)
50
51
52def _coerce_bool(value, default=False):

Callers 1

migrateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected