Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/js/internal/sql/mysql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ class PooledMySQLConnection extends BasePooledConnection<$ZigGeneratedClasses.My
/// pool. Refused connections (ERR_MYSQL_CONNECTION_REFUSED) fail fast:
/// nothing is listening, and probes/healthchecks rely on the immediate
/// error. Real server errors (authentication, handshake errors) and closes
/// of established connections are not retried here.
/// of established connections are not retried here. For the latter the pool
/// dials a new connection when callers are queued
/// (BaseSQLAdapter.connectionClosed).
Comment thread
robobun marked this conversation as resolved.
Outdated
protected isConnectFailureError(err: Error | null): boolean {
return err instanceof MySQLError && (err as any).code === "ERR_MYSQL_CONNECTION_FAILED";
}
Expand All @@ -187,8 +189,8 @@ class MySQLAdapter
implements
DatabaseAdapter<PooledMySQLConnection, $ZigGeneratedClasses.MySQLConnection, $ZigGeneratedClasses.MySQLQuery>
{
protected createPooledConnection(): PooledMySQLConnection {
return new PooledMySQLConnection(this.connectionInfo, this);
protected createPooledConnection(dialLater?: boolean): PooledMySQLConnection {
return new PooledMySQLConnection(this.connectionInfo, this, dialLater);
}

escapeIdentifier(str: string) {
Expand Down
7 changes: 4 additions & 3 deletions src/js/internal/sql/postgres.ts
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,8 @@ class PooledPostgresConnection extends BasePooledConnection<$ZigGeneratedClasses
/// fast: nothing is listening, and probes/healthchecks rely on the
/// immediate error. Real server errors (authentication, ErrorResponse
/// during startup) and closes of established connections are not retried
/// here.
/// here. For the latter the pool dials a new connection when callers are
/// queued (BaseSQLAdapter.connectionClosed).
Comment thread
robobun marked this conversation as resolved.
Outdated
protected isConnectFailureError(err: Error | null): boolean {
return err instanceof PostgresError && (err as any).code === "ERR_POSTGRES_CONNECTION_FAILED";
}
Expand All @@ -410,8 +411,8 @@ class PostgresAdapter
$ZigGeneratedClasses.PostgresSQLQuery
>
{
protected createPooledConnection(): PooledPostgresConnection {
return new PooledPostgresConnection(this.connectionInfo, this);
protected createPooledConnection(dialLater?: boolean): PooledPostgresConnection {
return new PooledPostgresConnection(this.connectionInfo, this, dialLater);
}

escapeIdentifier(str: string) {
Expand Down
Loading
Loading