Objects & CRUD

ObjectClient is the typed CRUD handle: upsert for one row, batch_upsert for many, typed_upsert for a Pydantic/dataclass-shaped object. All write bi-temporal rows with provenance.

5 methods across this domain. Signatures, parameters (incl. keyword-only tunable defaults), and the three SDK spellings are ported from the live SDK source; flagship methods carry a hand-written When to use + example.

ObjectClient

upsert(object_type, object_id, fields, purpose=None, source=None, on_conflict='upsert')

When to use. Write one typed object (dict) as a bi-temporal row.

  • Pythonclient.objectclient.upsert(object_type, object_id, fields, purpose=None, source=None, on_conflict='upsert')
  • TypeScriptupsert(objectType, objectId, fields, opts)
  • GoUpsert(objectType, objectID, fields)

Parameters: object_type, object_id, fields, purpose=None, source=None, on_conflict='upsert'

Example

ObjectClient.from_client(relata).upsert("Person", {"_pk":"p1","name":"Alice"})

batch_upsert(object_type, rows, purpose=None, source=None, on_conflict='upsert')

batch_upsert(object_type, rows, purpose=None, source=None, on_conflict='upsert')`

  • Pythonclient.objectclient.batch_upsert(object_type, rows, purpose=None, source=None, on_conflict='upsert')
  • TypeScriptbatchUpsert(objectType, rows, opts)
  • GoBatchUpsert(objectType, rows)

Parameters: object_type, rows, purpose=None, source=None, on_conflict='upsert'

delete(object_type, object_id, purpose=None)

delete(object_type, object_id, purpose=None)`

  • Pythonclient.objectclient.delete(object_type, object_id, purpose=None)

Parameters: object_type, object_id, purpose=None

get(object_type, object_id, purpose=None)

get(object_type, object_id, purpose=None)`

  • Pythonclient.objectclient.get(object_type, object_id, purpose=None)
  • TypeScriptget(objectType, objectId)

Parameters: object_type, object_id, purpose=None

typed_upsert(obj, purpose=None)

typed_upsert(obj, purpose=None)`

  • Pythonclient.objectclient.typed_upsert(obj, purpose=None)

Parameters: obj, purpose=None