Class DatabaseRouter

Less than 1 minute

Class DatabaseRouter

Declared in packages/core/echo/echo-schema/dist/types/src/database-router.d.ts:18

Manages cross-space databases. Tracks observable mutations on objects.

Constructors

constructor()

Returns: DatabaseRouter

Arguments: none

Properties

schema

Type: undefined | EchoSchema

Methods

addSchema(schema)

Returns: void

Arguments:

schema: EchoSchema

createAccessObserver()

Returns: AccessObserver

Arguments: none

createSubscription(onUpdate)

Subscribe to database updates. Calls the callback when any object from the selection changes. Calls the callback when the selection changes. Always calls the callback on the first selection.update call.

Returns: SubscriptionHandle

Arguments:

onUpdate: function

register(spaceKey, database)

Returns: void

Arguments:

spaceKey: PublicKey

database: EchoDatabase