Skip to content

Commit c285711

Browse files
committed
Fix to include the previsous random_idgen alias
1 parent b1a7371 commit c285711

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

lib/query/woqlQuery.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,6 +1192,12 @@ WOQLQuery.prototype.idgen_random = function (prefix, outputVar) {
11921192
return this;
11931193
};
11941194

1195+
/**
1196+
* Backward-compatible alias for idgen_random
1197+
* @deprecated Use idgen_random instead
1198+
*/
1199+
WOQLQuery.prototype.random_idgen = WOQLQuery.prototype.idgen_random;
1200+
11951201
/**
11961202
* Changes a string to upper-case
11971203
* @param {string|Var} inputVarName - string or variable representing the uncapitalized string

lib/woql.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,17 @@ WOQL.idgen_random = function (prefix, resultVarName) {
765765
return new WOQLQuery().idgen_random(prefix, resultVarName);
766766
};
767767

768+
/**
769+
* Backward-compatible alias for idgen_random
770+
* @deprecated Use idgen_random instead
771+
* @param {string} prefix - prefix for the generated ID
772+
* @param {string} resultVarName - variable that stores the generated ID
773+
* @returns {WOQLQuery} A WOQLQuery object containing the random ID generation function
774+
*/
775+
WOQL.random_idgen = function (prefix, resultVarName) {
776+
return new WOQLQuery().idgen_random(prefix, resultVarName);
777+
};
778+
768779
/**
769780
*
770781
* Changes a string to upper-case

0 commit comments

Comments
 (0)