This repository was archived by the owner on Mar 4, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 113
This repository was archived by the owner on Mar 4, 2026. It is now read-only.
Database.getDatabaseDialect's "cb" argument is never used #2075
Copy link
Copy link
Closed
Labels
api: spannerIssues related to the googleapis/nodejs-spanner API.Issues related to the googleapis/nodejs-spanner API.
Description
If we examine the method "getDatabaseDialect"
nodejs-spanner/src/database.ts
Lines 1530 to 1553 in 30151ca
| getDatabaseDialect( | |
| options: CallOptions, | |
| callback: GetDatabaseDialectCallback | |
| ): void; | |
| async getDatabaseDialect( | |
| optionsOrCallback?: CallOptions | GetDatabaseDialectCallback, | |
| cb?: GetDatabaseDialectCallback | |
| ): Promise< | |
| | EnumKey<typeof databaseAdmin.spanner.admin.database.v1.DatabaseDialect> | |
| | undefined | |
| > { | |
| const gaxOptions = | |
| typeof optionsOrCallback === 'object' ? optionsOrCallback : {}; | |
| if ( | |
| this.databaseDialect === 'DATABASE_DIALECT_UNSPECIFIED' || | |
| this.databaseDialect === null || | |
| this.databaseDialect === undefined | |
| ) { | |
| const [metadata] = await this.getMetadata(gaxOptions); | |
| this.databaseDialect = metadata.databaseDialect; | |
| } | |
| return this.databaseDialect || undefined; | |
| } |
we can see that the callback passed in is never used. I found this while working on trace instrumentation for these libraries.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: spannerIssues related to the googleapis/nodejs-spanner API.Issues related to the googleapis/nodejs-spanner API.