Interface: ServerlessDbLite

ServerlessDbLite

Exposes the functions and constants of the Webcom ServerlessDbLite service. This service is configured by the ServerlessDbLite property passed to the configuration of the associated WebcomApp.

This service provides an interface to a Webcom database. Under the hood, it works using only HTTP REST requests between the client and the Webcom back end.

By opposition with ServerlessDbLite.ServerlessDbNode this service :

  • Does not manage data cache, so a read operation returns data actually retrieved from Webcom back end, and a write operation is not executed when there is no data connectivity.
  • Does not manage real time connectivity with Webcom back end, as consequence notifications are only available through Webhooks

Instances of this interface are provided by the WebcomApp#serverlessDbLite property.

Since:
  • 3.4

Extends

Interfaces

ServerlessDbLiteNode

Members

(protected) _ltsAuth :Authentication.State

Internal authentication state associated with ongoing ServerlessDb.LongTermSubscriptions.

Type:
Inherited From:

rootNode :ServerlessDbLite.ServerlessDbLiteNode

Get the root data node managed by this ServerlessDbLite.

Type:

Methods

cleanLongTermSubscriptions()

Clears all the ongoing long term subscriptions associated with the current authenticated user from the client local storage.

This method requires a user to be authenticated.

WARNING: this method doesn't cancel the subscriptions!
It only removes them from the local storage, so that the ServerlessDb#getLongTermSubscriptions method can no longer retrieve them. Use ServerlessDb.ServerlessDbNode#unsubscribe or ServerlessDbLite.ServerlessDbLiteNode#unsubscribe to actually cancel them (otherwise they may still persist in the Webcom back end).

Inherited From:

getLongTermSubscriptions() → {Array.<ServerlessDb.LongTermSubscription>}

Retrieves the list of the ongoing long term subscriptions associated with the current authenticated user, which are stored in the client local storage.

Such subscriptions are stored when invoking the ServerlessDb.ServerlessDbNode#subscribe method with a ServerlessDb.Webhook or the ServerlessDbLite.ServerlessDbLiteNode#subscribe method.

This method requires a user to be authenticated.

Inherited From:
Returns:
Type
Array.<ServerlessDb.LongTermSubscription>

Type Definitions

Configuration

Properties:
Name Type Attributes Description
baseUrl URL | string <optional>

Base URL for a ServerlessDbLite.
If not set, the Webcom standard one is used.

show
deprecated