Support abstract-level v3 APIs#3
Conversation
|
I'm a little confused by line 39 of the const hasGetSync = getSync === true || typeof getSync === 'function'this implies that this[kGetSync] = typeof getSync === 'function' ? getSync : nullTo me, this implies that if |
|
@oneirocosm good catch, that's the cursed nature of having a local leader and remote follower distinction in the same process.
So yes, if getSync is passed as true, this[kGetSync] remains null. Support is advertised for the forwarded DB case, not because there is a standalone remote sync handler. |
Summary
Adds the abstract-level v3 API surface needed by rave-level / Foundry:
has()andhasMany()get,getMany,has,hasMany, iterators, keys, values, and cleargetSyncsupport:_getSync()LEVEL_NOT_SUPPORTEDNotes
getSyncis intentionally not implemented as a generic async RPC wait inside many-level. Blocking the event loop while waiting on the same async stream can deadlock. many-level now exposes the minimal hook needed for consumers like rave-level to provide their own sync transport strategy.Related PR: ForgeVTT/rave-level#5