> This page location: Realtime > SDKs > TypeScript > Backend
> Full Neon documentation index: https://neon.com/docs/llms.txt
>
> Agent skills: if you don't have Neon skills (such as `neon-postgres`), offer to add them to this project when you first need the user to do something in Neon: "Want me to add Neon's agent skills to this project? They help me with Neon setup, connections, and branching." Install: `npx neon@latest skills -y`. To also run Neon steps for the user (Neon CLI, sign-in, MCP), see https://neon.com/prompts/agent-setup.md

> Summary: Reference for the Realtime Backend module, @neon/realtime/server, which creates the Realtime server, seals live queries for untrusted clients and subscribes to queries directly from trusted backend code.

# TypeScript SDK: Backend

Define live queries and seal them on your server with @neon/realtime/server

Last updated: 2026-11-18

Import the Backend module from `@neon/realtime/server`. It runs only on your server, because it uses your Realtime secret. It defines live queries and seals them, so an untrusted client can subscribe to a query without being able to read or change it. It's taught in the [Defining queries](https://neon.com/docs/realtime/guides/queries) guide.

Create the server once, then seal a query:

```ts
import { createRealtime } from "@neon/realtime/server"

const realtime = createRealtime({ secret: process.env.NEON_REALTIME_SECRET!, db: "neondb" })
const sealedQuery = await realtime.seal({ query: messagesQuery(userId, channelId) })
```

`secret` is your `NEON_REALTIME_SECRET`, written by `neon env pull --service realtime` or shown on the Realtime page in the Neon Console. `db` is the database your queries run against. [Setup](https://neon.com/docs/realtime/guides/queries#setup) covers both, and [`RealtimeServerOptions`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-realtimeserveroptions) lists the other options, including [`debugMode`](https://neon.com/docs/realtime/guides/subscribing#show-full-database-errors).

## Direct subscriptions

Add a `url` to `createRealtime()` and it returns a [`RealtimeDirectServer`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-realtimedirectserver), which subscribes to queries itself, for workers, trusted agents and other backend code. [Subscribe in trusted backend code](https://neon.com/docs/realtime/guides/subscribing#subscribe-in-trusted-backend-code) shows how.

## Typed parameters

Most `rawSql` parameter values pass as they are. Wrap dates, JSON, `bytea` and arrays in a [`pgParam`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-pgparam) helper to name their Postgres type, as [Parameter types](https://neon.com/docs/realtime/guides/queries#parameter-types) shows.

## API reference

**Import specifier** `@neon/realtime/server`

### Symbols

| Symbol | Kind | Summary |
| - | - | - |
| [`createRealtime`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-createrealtime) | Function | Create a server-only Realtime SDK. `seal()` performs local encryption and no network requests. Supplying a WebSocket `url` additionally enables trusted direct subscriptions that mint and refresh their own capabilities. Keep the project secret out of browser bundles. |
| [`encodeTextParameter`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-encodetextparameter) | Function | Encode an already unambiguous scalar as a PostgreSQL text-format parameter. This low-level helper is intended for adapter authors. Application code using raw SQL should prefer [`pgParam`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-pgparam) for ambiguous PostgreSQL types. |
| [`isTypedRawSqlParameter`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-istypedrawsqlparameter) | Function | Test whether a value was created by one of the [`pgParam`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-pgparam) helpers. This low-level helper is intended for query-adapter authors. Applications should normally pass the wrapper directly to the adapter or [`rawSql`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-rawsql). |
| [`rawSql`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-rawsql) | Function | Define a typed raw SQL query. Values are sent separately from the SQL. Bare values use type OID `0`, asking PostgreSQL to infer their types from the SQL. Use [`pgParam`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-pgparam) when a value needs an explicit PostgreSQL encoder and built-in type OID. JavaScript `null` represents SQL `NULL`. |
| [`PostgresParameterHelpers`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-postgresparameterhelpers) | Interface | PostgreSQL text encoders for values that bare raw SQL cannot disambiguate. |
| [`PreparedLiveQuery`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-preparedlivequery) | Interface | Adapter-independent query encrypted into a live-query capability. |
| [`PreparedLiveQueryParameter`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-preparedlivequeryparameter) | Interface | One PostgreSQL text-format Bind parameter in a prepared live query. |
| [`RawSqlQuery`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-rawsqlquery) | Interface | Parameterized raw PostgreSQL SQL carrying its declared result-row type. |
| [`RealtimeAdapter`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-realtimeadapter) | Interface | Converts an ORM-native query into the prepared live-query representation. |
| [`RealtimeDirectServer`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-realtimedirectserver) | Interface | Server-only SDK with trusted direct-query subscriptions. Each subscription prepares and encrypts its query locally, then uses a shared low-level client and refreshes its capability automatically. It retains its rows while connecting through retryable outages and transparently replaces an expired subscription after connectivity returns. |
| [`RealtimeDirectServerOptions`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-realtimedirectserveroptions) | Interface | Configuration that enables trusted direct-query subscriptions. |
| [`RealtimeServer`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-realtimeserver) | Interface | Server-only Realtime capability issuer. |
| [`RealtimeServerOptions`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-realtimeserveroptions) | Interface | Configuration for a server-only Realtime capability issuer. |
| [`SealedLiveQuery`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-sealedlivequery) | Interface | JSON-compatible sealed representation of one exact live query. The query is a short-lived bearer credential. Transport it over HTTPS and do not put it in URLs, logs, or persistent browser storage. |
| [`TypedRawSqlParameter`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-typedrawsqlparameter) | Interface | A raw SQL parameter with an explicit PostgreSQL text encoder and type hint. |
| [`RawSqlParameter`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-rawsqlparameter) | Type alias | A JavaScript value accepted as a PostgreSQL text-format parameter. |
| [`RealtimeAdapterSource`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-realtimeadaptersource) | Type alias | Bounded query-builder family recorded in encrypted capabilities. |
| [`pgParam`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-pgparam) | Variable | Helpers for values whose PostgreSQL text encoding or type is ambiguous. |

### createRealtime

```ts
function createRealtime<Query = RawSqlQuery<unknown>>(options: RealtimeDirectServerOptions<Query>): RealtimeDirectServer<Query>
```

Create a server-only Realtime SDK.

`seal()` performs local encryption and no network requests. Supplying a
WebSocket `url` additionally enables trusted direct subscriptions that mint
and refresh their own capabilities. Keep the project secret out of browser
bundles.

**Returns:** A reusable capability issuer, extended with direct subscriptions
when `url` is present.

**Throws:** If the secret or database name is invalid.

#### Type parameters

| Name | Default | Description |
| - | - | - |
| `Query` | `RawSqlQuery<unknown>` | Query object accepted by the configured adapter. |

#### Parameters

| Name | Type | Description |
| - | - | - |
| `options` | `RealtimeDirectServerOptions<Query>` | Server-only secret, database name, and optional query adapter. |

#### Returns

`RealtimeDirectServer<Query>`

```ts
function createRealtime<Query = RawSqlQuery<unknown>>(options: RealtimeServerOptions<Query>): RealtimeServer<Query>
```

Create a server-only Realtime SDK.

`seal()` performs local encryption and no network requests. Supplying a
WebSocket `url` additionally enables trusted direct subscriptions that mint
and refresh their own capabilities. Keep the project secret out of browser
bundles.

**Returns:** A reusable capability issuer, extended with direct subscriptions
when `url` is present.

**Throws:** If the secret or database name is invalid.

#### Type parameters

| Name | Default | Description |
| - | - | - |
| `Query` | `RawSqlQuery<unknown>` | Query object accepted by the configured adapter. |

#### Parameters

| Name | Type | Description |
| - | - | - |
| `options` | `RealtimeServerOptions<Query>` | Server-only secret, database name, and optional query adapter. |

#### Returns

`RealtimeServer<Query>`

### encodeTextParameter

```ts
function encodeTextParameter(value: string | number | bigint | boolean | null, typeOid: number = 0): PreparedLiveQueryParameter
```

Encode an already unambiguous scalar as a PostgreSQL text-format parameter.

This low-level helper is intended for adapter authors. Application code
using raw SQL should prefer [`pgParam`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-pgparam) for ambiguous PostgreSQL types.

**Returns:** An immutable prepared parameter.

#### Parameters

| Name | Type | Description |
| - | - | - |
| `value` | `string \| number \| bigint \| boolean \| null` | Scalar value, or `null` for SQL `NULL`. |
| `typeOid` | `number` | PostgreSQL type OID hint, or `0` for SQL-context inference. |

#### Returns

`PreparedLiveQueryParameter`

### isTypedRawSqlParameter

```ts
function isTypedRawSqlParameter(value: unknown): value is TypedRawSqlParameter
```

Test whether a value was created by one of the [`pgParam`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-pgparam) helpers.

This low-level helper is intended for query-adapter authors. Applications
should normally pass the wrapper directly to the adapter or [`rawSql`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-rawsql).

#### Parameters

| Name | Type | Description |
| - | - | - |
| `value` | `unknown` | |

#### Returns

`value is TypedRawSqlParameter`

### rawSql

```ts
function rawSql<Row>(sql: string, parameters: readonly RawSqlParameter[] = []): RawSqlQuery<Row>
```

Define a typed raw SQL query. Values are sent separately from the SQL. Bare
values use type OID `0`, asking PostgreSQL to infer their types from the
SQL. Use [`pgParam`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-pgparam) when a value needs an explicit PostgreSQL encoder
and built-in type OID. JavaScript `null` represents SQL `NULL`.

**Returns:** An immutable query descriptor accepted by `seal()`.

#### Type parameters

| Name | Default | Description |
| - | - | - |
| `Row` | | Row returned by the query. |

#### Parameters

| Name | Type | Description |
| - | - | - |
| `sql` | `string` | Parameterized SQL using PostgreSQL placeholders such as `$1`. |
| `parameters` | `readonly RawSqlParameter[]` | Values in placeholder order. |

#### Returns

`RawSqlQuery<Row>`

### PostgresParameterHelpers

```ts
interface PostgresParameterHelpers
```

PostgreSQL text encoders for values that bare raw SQL cannot disambiguate.

#### Members

| Name | Type | Description |
| - | - | - |
| `array` | `(elementType: string, values: readonly unknown[]) => TypedRawSqlParameter` | Encode a possibly nested PostgreSQL array. Built-in element types supply their stable array OID; database-specific or unknown element types use OID `0`. JavaScript `null` becomes a SQL NULL array element. Values are encoded immediately, so later mutations do not affect the parameter. |
| `bytea` | `(value: Uint8Array) => TypedRawSqlParameter` | Encode bytes in PostgreSQL's hexadecimal `bytea` text format. |
| `date` | `(value: string \| Date) => TypedRawSqlParameter` | Encode a JavaScript date as a PostgreSQL `date`. A `Date` uses its UTC calendar date. A string is passed through as an already encoded PostgreSQL text value. |
| `json` | `(value: unknown) => TypedRawSqlParameter` | Encode a JavaScript value as PostgreSQL `json`. |
| `jsonb` | `(value: unknown) => TypedRawSqlParameter` | Encode a JavaScript value as PostgreSQL `jsonb`. |
| `text` | `(sqlType: string, value: string \| number \| bigint \| boolean \| null) => TypedRawSqlParameter` | Use an already encoded PostgreSQL text value for a named type. A recognized built-in type supplies its stable OID. Unknown, database-specific, and extension types use OID `0` for inference. |
| `timestamp` | `(value: string \| Date) => TypedRawSqlParameter` | Encode a JavaScript date as a UTC PostgreSQL `timestamp` without time zone. A string is passed through as an already encoded PostgreSQL text value. |
| `timestamptz` | `(value: string \| Date) => TypedRawSqlParameter` | Encode a JavaScript date as a PostgreSQL `timestamptz`. A `Date` uses its ISO 8601 representation. A string is passed through as an already encoded PostgreSQL text value. |

### PreparedLiveQuery

```ts
interface PreparedLiveQuery
```

Adapter-independent query encrypted into a live-query capability.

#### Members

| Name | Type | Description |
| - | - | - |
| `parameters` | `readonly PreparedLiveQueryParameter[]` | PostgreSQL text-format Bind values and type hints in placeholder order. |
| `sql` | `readonly string` | Parameterized SQL. Adapters must never interpolate runtime values here. |

### PreparedLiveQueryParameter

```ts
interface PreparedLiveQueryParameter
```

One PostgreSQL text-format Bind parameter in a prepared live query.

#### Members

| Name | Type | Description |
| - | - | - |
| `typeOid` | `readonly number` | PostgreSQL type OID hint, or `0` to request SQL-context inference. |
| `value` | `readonly string \| null` | PostgreSQL text-format value, or `null` for SQL `NULL`. |

### RawSqlQuery

```ts
interface RawSqlQuery<Row> extends PreparedLiveQuery
```

Parameterized raw PostgreSQL SQL carrying its declared result-row type.

#### Members

| Name | Type | Description |
| - | - | - |
| `parameters` | `readonly PreparedLiveQueryParameter[]` | PostgreSQL text-format Bind values and type hints in placeholder order. |
| `sql` | `readonly string` | Parameterized SQL. Adapters must never interpolate runtime values here. |

### RealtimeAdapter

```ts
interface RealtimeAdapter<Query>
```

Converts an ORM-native query into the prepared live-query representation.

#### Members

| Name | Type | Description |
| - | - | - |
| `querySource?` | `readonly RealtimeAdapterSource` | Query-builder family used for aggregate Realtime usage metrics. Official adapters set this automatically; custom adapters may omit it. |
| `prepare` | `(query: Query) => PreparedLiveQuery` | Convert an adapter-native query into parameterized SQL and text-format parameter values. Adapters may supply PostgreSQL type OID hints; `0` requests inference. The proxy supplies result types. |

### RealtimeDirectServer

```ts
interface RealtimeDirectServer<Query> extends RealtimeServer<Query>
```

Server-only SDK with trusted direct-query subscriptions.

Each subscription prepares and encrypts its query locally, then uses a
shared low-level client and refreshes its capability automatically. It
retains its rows while connecting through retryable outages and
transparently replaces an expired subscription after connectivity returns.

#### Members

| Name | Type | Description |
| - | - | - |
| `close` | `() => void` | Permanently close every direct subscription and the shared WebSocket. |
| [`seal`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-realtimedirectserverseal) | `<ConcreteQuery>(input: SealInput<ConcreteQuery>) => Promise<SealedLiveQuery<QueryRow<ConcreteQuery>>>` | Encrypt a concrete query as a short-lived sealed query. Raw queries produced by [`rawSql`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-rawsql) are always accepted. Other query objects are prepared by the configured adapter. SQL validation is deferred to the Realtime proxy when the capability is used. |
| [`subscribe`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-realtimedirectserversubscribe) | `<ConcreteQuery>(query: ConcreteQuery, options?: MaterializedLiveQueryOptions<QueryRow<ConcreteQuery>>) => Promise<MaterializedLiveQuerySubscription<QueryRow<ConcreteQuery>>> & <ConcreteQuery>(query: ConcreteQuery, options: RawLiveQueryOptions) => Promise<RawLiveQuerySubscription<QueryRow<ConcreteQuery>>>` | Subscribe to a query and retain its current materialized rows. |

#### RealtimeDirectServer.seal

```ts
seal<ConcreteQuery>(input: SealInput<ConcreteQuery>): Promise<SealedLiveQuery<QueryRow<ConcreteQuery>>>
```

Encrypt a concrete query as a short-lived sealed query.

Raw queries produced by [`rawSql`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-rawsql) are always accepted. Other query
objects are prepared by the configured adapter. SQL validation is deferred
to the Realtime proxy when the capability is used.

**Returns:** A JSON-compatible bearer capability with its public fingerprint
and expiry.

**Throws:** If no adapter can prepare the query or capability encryption fails.

**Parameters**

| Name | Type | Description |
| - | - | - |
| `input` | `SealInput<ConcreteQuery>` | Concrete query to seal. |

#### RealtimeDirectServer.subscribe

```ts
subscribe<ConcreteQuery>(query: ConcreteQuery, options?: MaterializedLiveQueryOptions<QueryRow<ConcreteQuery>>): Promise<MaterializedLiveQuerySubscription<QueryRow<ConcreteQuery>>>
```

Subscribe to a query and retain its current materialized rows.

**Returns:** An independently disposable subscription after its initial
capability has been minted locally.

**Throws:** If the query is invalid or the direct client has been closed.

**Parameters**

| Name | Type | Description |
| - | - | - |
| `query` | `ConcreteQuery` | Concrete raw SQL or adapter-native query. |
| `options?` | `MaterializedLiveQueryOptions<QueryRow<ConcreteQuery>>` | Materialization and optional preloaded-row settings. |

```ts
subscribe<ConcreteQuery>(query: ConcreteQuery, options: RawLiveQueryOptions): Promise<RawLiveQuerySubscription<QueryRow<ConcreteQuery>>>
```

Subscribe to complete rows and atomic change batches without retaining rows.

**Returns:** An independently disposable raw subscription after its initial
capability has been minted locally.

**Throws:** If the query is invalid or the direct client has been closed.

**Parameters**

| Name | Type | Description |
| - | - | - |
| `query` | `ConcreteQuery` | Concrete raw SQL or adapter-native query. |
| `options` | `RawLiveQueryOptions` | Set `materialize` to `false` to consume raw events. |

### RealtimeDirectServerOptions

```ts
interface RealtimeDirectServerOptions<Query> extends RealtimeServerOptions<Query>
```

Configuration that enables trusted direct-query subscriptions.

#### Members

| Name | Type | Description |
| - | - | - |
| `adapter?` | `readonly RealtimeAdapter<Query>` | Adapter for ORM-native queries; omit when sealing only raw SQL. |
| `db` | `readonly string` | PostgreSQL database for this SDK instance. It is embedded in every query capability. The first capability accepted on a WebSocket binds that connection to this database. |
| [`debugMode?`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-realtimedirectserveroptionsdebugmode) | `readonly boolean` | Include full database error details in subscription errors. Enable this only in development. Detailed errors can expose schema names, table names, column names, and other database structure to clients. |
| `logger?` | `readonly RealtimeLogger` | Structured diagnostic sink for the internal direct-subscription client. |
| `logLevel?` | `readonly RealtimeLogLevel` | Minimum diagnostic level for the internal direct-subscription client. |
| `parsers?` | `readonly Readonly<Record<number, PostgreSQLBytesParser<unknown> \| PostgreSQLTextParser<unknown>> & BuiltInParsers>` | PostgreSQL result-parser overrides for trusted direct subscriptions. |
| `secret` | `readonly string` | Opaque server-only credential issued by Realtime. |
| `url` | `readonly string` | Realtime WebSocket endpoint URL. Supplying it adds `subscribe()` and `close()` to the returned SDK. |

#### RealtimeDirectServerOptions.debugMode

```ts
readonly debugMode?: boolean
```

Include full database error details in subscription errors.

Enable this only in development. Detailed errors can expose schema names,
table names, column names, and other database structure to clients.

**Default**

```ts
false
```

### RealtimeServer

```ts
interface RealtimeServer<Query>
```

Server-only Realtime capability issuer.

#### Members

| Name | Type | Description |
| - | - | - |
| [`seal`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-realtimeserverseal) | `<ConcreteQuery>(input: SealInput<ConcreteQuery>) => Promise<SealedLiveQuery<QueryRow<ConcreteQuery>>>` | Encrypt a concrete query as a short-lived sealed query. Raw queries produced by [`rawSql`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-rawsql) are always accepted. Other query objects are prepared by the configured adapter. SQL validation is deferred to the Realtime proxy when the capability is used. |

#### RealtimeServer.seal

```ts
seal<ConcreteQuery>(input: SealInput<ConcreteQuery>): Promise<SealedLiveQuery<QueryRow<ConcreteQuery>>>
```

Encrypt a concrete query as a short-lived sealed query.

Raw queries produced by [`rawSql`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-rawsql) are always accepted. Other query
objects are prepared by the configured adapter. SQL validation is deferred
to the Realtime proxy when the capability is used.

**Returns:** A JSON-compatible bearer capability with its public fingerprint
and expiry.

**Throws:** If no adapter can prepare the query or capability encryption fails.

**Parameters**

| Name | Type | Description |
| - | - | - |
| `input` | `SealInput<ConcreteQuery>` | Concrete query to seal. |

### RealtimeServerOptions

```ts
interface RealtimeServerOptions<Query>
```

Configuration for a server-only Realtime capability issuer.

#### Members

| Name | Type | Description |
| - | - | - |
| `adapter?` | `readonly RealtimeAdapter<Query>` | Adapter for ORM-native queries; omit when sealing only raw SQL. |
| `db` | `readonly string` | PostgreSQL database for this SDK instance. It is embedded in every query capability. The first capability accepted on a WebSocket binds that connection to this database. |
| [`debugMode?`](https://neon.com/docs/realtime/sdks/typescript/backend#backend-realtimeserveroptionsdebugmode) | `readonly boolean` | Include full database error details in subscription errors. Enable this only in development. Detailed errors can expose schema names, table names, column names, and other database structure to clients. |
| `secret` | `readonly string` | Opaque server-only credential issued by Realtime. |

#### RealtimeServerOptions.debugMode

```ts
readonly debugMode?: boolean
```

Include full database error details in subscription errors.

Enable this only in development. Detailed errors can expose schema names,
table names, column names, and other database structure to clients.

**Default**

```ts
false
```

### SealedLiveQuery

```ts
interface SealedLiveQuery<Row>
```

JSON-compatible sealed representation of one exact live query.

The query is a short-lived bearer credential. Transport it over
HTTPS and do not put it in URLs, logs, or persistent browser storage.

#### Members

| Name | Type | Description |
| - | - | - |
| `capability` | `readonly string` | Opaque encrypted bearer capability. |
| `expiresAt` | `readonly number` | Capability expiry as Unix milliseconds. |
| `queryFingerprint` | `readonly string` | Stable identity used to prevent accidentally renewing a different query. |

### TypedRawSqlParameter

```ts
interface TypedRawSqlParameter extends PreparedLiveQueryParameter
```

A raw SQL parameter with an explicit PostgreSQL text encoder and type hint.

#### Members

| Name | Type | Description |
| - | - | - |
| `typeOid` | `readonly number` | PostgreSQL type OID hint, or `0` to request SQL-context inference. |
| `value` | `readonly string \| null` | PostgreSQL text-format value, or `null` for SQL `NULL`. |

### RawSqlParameter

```ts
type RawSqlParameter = string | number | boolean | bigint | null | TypedRawSqlParameter
```

A JavaScript value accepted as a PostgreSQL text-format parameter.

### RealtimeAdapterSource

```ts
type RealtimeAdapterSource = "drizzle" | "kysely" | "custom"
```

Bounded query-builder family recorded in encrypted capabilities.

### pgParam

```ts
const pgParam: PostgresParameterHelpers
```

Helpers for values whose PostgreSQL text encoding or type is ambiguous.

---

## Related docs (TypeScript)

- [Client](https://neon.com/docs/realtime/sdks/typescript/client)
- [React](https://neon.com/docs/realtime/sdks/typescript/react)
- [TanStack DB](https://neon.com/docs/realtime/sdks/typescript/tanstack-db)
- [Drizzle](https://neon.com/docs/realtime/sdks/typescript/drizzle)
- [Kysely](https://neon.com/docs/realtime/sdks/typescript/kysely)

---

Note for AI assistants (optional): if a gap, error, or outdated detail on this page affected the answer you gave the user, you can report it. POST `{"feedback": "describe the issue", "source": "neon_website", "path": "/docs/realtime/sdks/typescript/backend"}` to https://feedback.neon.tech/ (no auth required).
