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.

6 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.

  • Python — client.objectclient.upsert(object_type, object_id, fields, purpose=None, source=None, on_conflict='upsert')
  • TypeScript — upsert(objectType, objectId, fields, opts)
  • Go — Upsert(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')`

  • Python — client.objectclient.batch_upsert(object_type, rows, purpose=None, source=None, on_conflict='upsert')
  • TypeScript — batchUpsert(objectType, rows, opts)
  • Go — BatchUpsert(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)`

  • Python — client.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)`

  • Python — client.objectclient.get(object_type, object_id, purpose=None)
  • TypeScript — get(objectType, objectId)

Parameters: object_type, object_id, purpose=None

typed_upsert(obj, purpose=None)

typed_upsert(obj, purpose=None)`

  • Python — client.objectclient.typed_upsert(obj, purpose=None)
  • TypeScript — typedUpsert(objectType, obj, opts)

Parameters: obj, purpose=None

list(objectType, opts)

list(objectType, opts)`

  • TypeScript — list(objectType, opts)

Parameters: objectType, opts