@react-native-ohos/realm
Version:
Realm by MongoDB is an offline-first mobile database: an alternative to SQLite and key-value stores
46 lines (45 loc) • 1.68 kB
TypeScript
import type { binding } from "../binding";
import type { BSON } from "../bson";
/**
* Class representing a single query subscription in a set of flexible sync
* {@link SubscriptionSet}. This class contains readonly information about the
* subscription – any changes to the set of subscriptions must be carried out
* in a {@link SubscriptionSet.update} callback.
*/
export declare class Subscription {
internal: binding.SyncSubscription;
/** @internal */
constructor(/** @internal */ internal: binding.SyncSubscription);
/**
* The ObjectId of the subscription.
* @returns The ObjectId of the subscription.
*/
get id(): BSON.ObjectId;
/**
* The date when this subscription was created.
* @returns The date when this subscription was created.
*/
get createdAt(): Date;
/**
* The date when this subscription was last updated.
* @returns The date when this subscription was last updated.
*/
get updatedAt(): Date;
/**
* The name given to this subscription when it was created.
* If no name was set, this will be `null`.
* @returns The name of the subscription or `null` if unnamed.
*/
get name(): string | null;
/**
* The type of objects the subscription refers to.
* @returns The type of objects the subscription refers to.
*/
get objectType(): string;
/**
* The string representation of the query the subscription was created with.
* If no filter or sort was specified, this will be `"TRUEPREDICATE"`.
* @returns The string representation of the query the subscription was created with.
*/
get queryString(): string;
}