Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
class connectionHolder.ConnectionHolder
implements ConnectionHolderInterface
import { connectionHolder } from "https://deno.land/x/neo4j_lite_client@4.4.6/core/internal/index.ts";
const { ConnectionHolder } = connectionHolder;

Utility to lazily initialize connections and return them back to the pool when unused.

Constructors

new
ConnectionHolder(unnamed 0?: { mode?: string; database?: string; bookmark?: Bookmark; connectionProvider?: ConnectionProvider; impersonatedUser?: string; onDatabaseNameResolved?: (databaseName?: string) => void; })

Properties

private
_bookmark: Bookmark
private
_connectionPromise: Promise<Connection | void>
private
optional
_connectionProvider: ConnectionProvider
private
optional
_database: string
private
optional
_impersonatedUser: string
private
_mode: string
private
optional
_onDatabaseNameResolved: (databaseName?: string) => void
private
_referenceCount: number

Methods

private
_releaseConnection(): Promise<Connection | void>

Return the current pooled connection instance to the connection pool. We don't pool Session instances, to avoid users using the Session after they've called close. The Session object is just a thin wrapper around Connection anyway, so it makes little difference.

bookmark(): Bookmark
close(): Promise<void | Connection>
connectionProvider(): ConnectionProvider | undefined
database(): string | undefined
getConnection(): Promise<Connection | void>
mode(): string | undefined
referenceCount(): number
releaseConnection(): Promise<void | Connection>
setDatabase(database?: string)