Play with Drizzle in your browser
AGPL-3.0 License
https://github.com/rphlmr/drizzle-run/releases/tag/v0.8.2
relation "xxx" already exists
is now fixedPublished by rphlmr about 2 months ago
You can now use vector in your playgrounds!
https://github.com/rphlmr/drizzle-run/releases/tag/v0.8.2
There is a breaking change in the internal schema of PGlite for IndexedDB.
Your local playgrounds have been migrated. If data has been lost, check in local storage, there is a backup.
Published by rphlmr about 2 months ago
Hey 👋 massive new things for this release!
You can now put all your seed data in this tab.
It is included when you share your playground and it will run just before executing your code. 🚀
I have written a new custom code runner. Your playgrounds now execute instantly 🚀
Works on all browsers (including Safari)
Outputs now display which file produced them.
Previous outputs of a run are now hidden. You can still view them by selecting previous run results. (https://github.com/rphlmr/drizzle-run/issues/3)
It implements a fork of Drizzle Kit. Feel free to open an issue if something is not working.
Drizzle Visualizer has been added to all playgrounds.
You can now view all shared playgrounds and search by keyword or dialect.
Experimental Drizzle to SQL and SQL to Drizzle.
Write the code, get instant conversion.
Again, it is based on a fork of Drizzle Kit.
You can now resize the playground workspace as you want!
https://github.com/rphlmr/drizzle-run/issues/2
I have removed Faker ($.faker
) and replaced it with a custom ultra-light one: $.random
/**
* Generates a random UUID
*/
uuid() {
return crypto.randomUUID();
},
/**
* Generates a random integer between min and max
* @param min The minimum value (default: -10_000)
* @param max The maximum value (default: 10_000)
*/
integer(min = -10_000, max = 10_000) {
return Math.floor(Math.random() * (max - min + 1)) + min;
},
/**
* Generates a sequence of integers from 0 to length - 1
* @param length The length of the array
*
* @example
* ```
* $.random.sequence(5) // [0, 1, 2, 3, 4]
* ```
*/
sequence(length: number) {
return Array.from({ length }, (_, i) => i);
},
/**
* Generates a random decimal between min and max
* @param min The minimum value (default: -10_000)
* @param max The maximum value (default: 10_000)
*/
decimal(min = -10_000, max = 10_000) {
return (Math.random() * (max - min) + min).toFixed(2);
},
/**
* Generates a random string of lorem ipsum words
* @param wordCount The number of words to generate (default: 5)
*/
lorem(wordCount: number = 5): string {
return Array.from({ length: wordCount }, () => loremWords[Math.floor(Math.random() * loremWords.length)]).join(" ");
},
/**
* Generates a random first name
*/
firstName(): string {
return firstNames[Math.floor(Math.random() * firstNames.length)];
},
/**
* Generates a random last name
*/
lastName(): string {
return lastNames[Math.floor(Math.random() * lastNames.length)];
},
/**
* Generates a random full name
*/
fullName(): string {
return `${this.firstName()} ${this.lastName()}`;
},
/**
* Generates a random email address
*/
email(): string {
const chars = "abcdefghijklmnopqrstuvwxyz";
const length = this.integer(5, 10);
let result = "";
for (let i = 0; i < length; i++) {
result += chars.charAt(Math.floor(Math.random() * chars.length));
}
const number = this.integer(0, 999);
return `${result}${number}@email.com`;
},
/**
* Generates a random date between start and end
* @param start The start date (default: 1970-01-01)
* @param end The end date (default: current date)
*/
date(start: Date = new Date(1970, 0, 1), end: Date = new Date()): Date {
return new Date(start.getTime() + Math.random() * (end.getTime() - start.getTime()));
},
/**
* Generates a random URL
*/
url(): string {
const domainName = this.lorem(1).toLowerCase();
return `https://www.${domainName}.com`;
},
/**
* Generates a random image URL
*/
imageUrl(): string {
const id = this.integer(0, 99);
return `https://picsum.photos/id/${id}/200/200`;
},
/**
* Generates an array
* @param length The length of the array
* @param generator The generator function
*
* @example
* ```
* $.random.array(4, $.random.date)
* ```
*/
array<T extends () => unknown>(length: number, generator: T) {
return Array.from({ length }, () => generator()) as ReturnType<T>[];
},
Published by rphlmr about 2 months ago
Full Changelog: https://github.com/rphlmr/drizzle-run/commits/v0.7.1
Published by rphlmr 3 months ago
Published by rphlmr 3 months ago
Hey 👋 some new things for this release!
(#21 ) You can now visualize your schema and export it as a PNG.
👉 Try it!
diff --git a/node_modules/@vercel/og/dist/index.node.js b/node_modules/@vercel/og/dist/index.node.js
index c92983c..ac1bb7c 100644
--- a/node_modules/@vercel/og/dist/index.node.js
+++ b/node_modules/@vercel/og/dist/index.node.js
@@ -18786,7 +18786,11 @@ async function render(satori2, resvg, opts, defaultFonts, element) {
value: options.width
}
});
- return resvgJS.render().asPng();
+ const pngData = resvgJS.render();
+ const pngBuffer = pngData.asPng();
+ pngData.free();
+ resvgJS.free();
+ return pngBuffer;
}
// src/figma/index.tsx
Published by rphlmr 3 months ago
Hey 👋 some new things for this release!
Schema
(#20) You can now use $.faker
for $default
and $defaultFn
name: text("name")
.notNull()
.$defaultFn(() => $.faker.person.lastName())
drizzle-zod
and drizzle-valibot
are now available in all playgrounds (#16)
You can now identify which playground is shared (you can filter on the keyword shared
)
The share button has been reworked to easily reflect its status
The publish button has been reworked to draw your attention to the fact that your shared playground has some pending changes that have not been pushed.
You can now discard local changes that have not been pushed and revert to the server version.
Some users can face cryptic errors when they miss some awaits on async function calls.
Now we try to help you.
The default formatter has been replaced with prettier
Published by rphlmr 3 months ago
Published by rphlmr 4 months ago
Published by rphlmr 4 months ago
Published by rphlmr 4 months ago
Published by rphlmr 4 months ago