Skip to content

Commit

Permalink
fix: restored buildColumnAlias for backward compatibility (#7706)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexMesser committed Jun 3, 2021
1 parent 8349182 commit 36ceefa
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/driver/DriverUtils.ts
Expand Up @@ -92,6 +92,13 @@ export class DriverUtils {
return newAlias;
}

/**
* @deprecated use `buildAlias` instead.
*/
static buildColumnAlias({ maxAliasLength }: Driver, buildOptions: { shorten?: boolean, joiner?: string } | string, ...alias: string[]) {
return this.buildAlias({ maxAliasLength } as Driver, buildOptions, ...alias);
}

// -------------------------------------------------------------------------
// Private Static Methods
// -------------------------------------------------------------------------
Expand Down Expand Up @@ -149,7 +156,7 @@ export class DriverUtils {
let port = undefined;
let hostReplicaSet = undefined;
let replicaSet = undefined;

let optionsObject: any = {};

if (afterBase && afterBase.indexOf("?") !== -1) {
Expand Down Expand Up @@ -201,7 +208,7 @@ export class DriverUtils {
port: port ? parseInt(port) : undefined,
database: afterBase || undefined
};

// Loop to set every options in connectionUrl to object
for (const [key, value] of Object.entries(optionsObject)) {
connectionUrl[key] = value;
Expand Down

0 comments on commit 36ceefa

Please sign in to comment.