You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use RT.Comb on the back-end, however I also need it on the browser, so I wrote the following JavaScript function:
function newSequentialGuid() {
var ms = new Date().getTime().toString(16).padStart(12, "0");
var a = new Uint8Array(10);
crypto.getRandomValues(a);
a[0] = a[0] & 15 | 64;
a[2] = a[2] & 63 | 128;
return ms + Array.prototype.map.call(a, x => x.toString(16).padStart(2, "0")).join("");
}
Please, could you confirm it is equivalent to RT.Comb.Provider.Postgre.Create().ToString("N") ?
The text was updated successfully, but these errors were encountered:
I don't use PostgreSql, so I'll have to look into this when I can get some time to run a proper test. If someone else can confirm, that would be great!
I've considered releasing a JavaScript version of this library on npm... I wrote an equivalent function for doing Unix timestamps on MSSQL GUIDs awhile back, so perhaps combining this and that and a few other things, a robust solution can be created.
I use RT.Comb on the back-end, however I also need it on the browser, so I wrote the following JavaScript function:
Please, could you confirm it is equivalent to
RT.Comb.Provider.Postgre.Create().ToString("N")
?The text was updated successfully, but these errors were encountered: