icdevs / ICEventsWG

WG for developing an Event System(pub/sub) on the Internet Computer
3 stars 3 forks source link

TransactionIds as returns #50

Closed skilesare closed 2 months ago

skilesare commented 4 months ago

-Returning from register publication/register subscription -> Do we need a Nat to return the record id if we are recording transactions? This can be nullable for items that don't have transaction log?

type RegisterPublicationResult = variant {
  Ok: nat;
  Err: RegisterPublicationError;
};

vs

type RegisterPublicationResult = variant {
  Ok: {
   publicationId: nat;
   transactionId: opt nat;
  Err: RegisterPublicationError;
};
skilesare commented 4 months ago

Refactor Batch updates!!! to use opt for result types

skilesare commented 4 months ago

Think about it and readdress next week.

skilesare commented 4 months ago
type PublicationIdentifier = variant {
  namespace: text;
  publicationId: nat;
};

type SubscriptionIdentifier = variant {
  namespace: text;
  subscriptionId: nat;
};
skilesare commented 2 months ago

Done