Skip to main content
This release is 8 versions behind 0.2.12 — the latest version of @clashon/platform-persistence. Jump to latest

Database abstraction layer for ClashOn gaming platform.

This package works with Node.js, Deno, BrowsersIt is unknown whether this package works with Cloudflare Workers, Bun
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
It is unknown whether this package works with Bun
This package works with Browsers
JSR Score
70%
Published
a month ago (0.2.3)
function DB.subscribeToMasterRoundResult
subscribeToMasterRoundResult(
roundId: number,
onResult: (payload: RealtimePostgresInsertPayload<Database["public"]["Tables"]["MasterRoundResult"]["Row"]>) => void,
onSubscribed?: () => void,
): RealtimeChannel

Subscribe to MasterRoundResult inserts for a specific round.

Parameters

roundId: number
  • The ID of the master round to monitor
onResult: (payload: RealtimePostgresInsertPayload<Database["public"]["Tables"]["MasterRoundResult"]["Row"]>) => void
  • Callback function that will be called when the result is available
optional
onSubscribed: () => void
  • Optional callback that will be called when the subscription is established

Return Type

A RealtimeChannel object that can be used to manage the subscription

Add Package

deno add jsr:@clashon/platform-persistence

Import symbol

import { DB } from "@clashon/platform-persistence";

---- OR ----

Import directly with a jsr specifier

import { DB } from "jsr:@clashon/platform-persistence";

Add Package

npx jsr add @clashon/platform-persistence

Import symbol

import { DB } from "@clashon/platform-persistence";

Add Package

yarn dlx jsr add @clashon/platform-persistence

Import symbol

import { DB } from "@clashon/platform-persistence";

Add Package

pnpm dlx jsr add @clashon/platform-persistence

Import symbol

import { DB } from "@clashon/platform-persistence";

Add Package

bunx jsr add @clashon/platform-persistence

Import symbol

import { DB } from "@clashon/platform-persistence";