For anyone considering the use of ULIDs in MySQL with drizzle, here's a ready-to-use ULID type for your convenience.
import { Ulid as ULID } from "id128";
export const ulid = customType<{
data: string;
notNull: true;
default: false;| Object.defineProperty(Object.prototype, "hide", { | |
| value: function () { | |
| [].forEach.call(arguments, function (name) { | |
| var descriptor = Object.getOwnPropertyDescriptor(this, name); | |
| if (descriptor.enumerable) { | |
| descriptor.enumerable = false; | |
| Object.defineProperty(this, name, descriptor); | |
| } | |
| }, this); | |
| } |
| /** | |
| * Converts an RGB color value to HSL. Conversion formula | |
| * adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
| * Assumes r, g, and b are contained in the set [0, 255] and | |
| * returns h, s, and l in the set [0, 1]. | |
| * | |
| * @param Number r The red color value | |
| * @param Number g The green color value | |
| * @param Number b The blue color value | |
| * @return Array The HSL representation |
| <?php | |
| /** | |
| * Get font awesome file icon class for specific MIME Type | |
| * @see https://gist.github.com/guedressel/0daa170c0fde65ce5551 | |
| * | |
| */ | |
| function ($mime_type) { | |
| // List of official MIME Types: http://www.iana.org/assignments/media-types/media-types.xhtml | |
| $icon_classes = array( |
For anyone considering the use of ULIDs in MySQL with drizzle, here's a ready-to-use ULID type for your convenience.
import { Ulid as ULID } from "id128";
export const ulid = customType<{
data: string;
notNull: true;
default: false;