Back to packages list

Vals using drizzle-orm

Description from the NPM package:
Drizzle ORM package for SQL databases
saolsen avatar
saolsen
lucia_hono
HTTP
// deno-lint-ignore-file no-namespace
1
yawnxyz avatar
yawnxyz
dobby
Script
Simple wrapper class around valtown's sqlite https://www.val.town/v/yawnxyz/dobby // Example usage: const dobby = new Dobby("myDatabase", [ { name: "id", type: "INTEGER", primaryKey: true }, { name: "name", type: "TEXT", notNull: true }, { name: "age", type: "INTEGER" }, { name: "balance", type: "REAL" }, ]); await dobby.createDatabase(); // Insert some sample data await dobby.insert({ id: 1, name: "John Doe", age: 30, balance: 1000.50 }); await dobby.insert({ id: 2, name: "Jane Smith", age: 25, balance: 2000.75 }); await dobby.insert({ id: 3, name: "Bob Johnson", age: 40, balance: 1500.25 }); // Filter examples const results1 = await dobby.filter({ age: { gt: 25 } }); console.log("Users older than 25:", results1); const results2 = await dobby.filter({ name: { like: '%John%' } }); console.log("Users with 'John' in their name:", results2); const results3 = await dobby.filter({ balance: { between: [1000, 2000] } }); console.log("Users with balance between 1000 and 2000:", results3); const results4 = await dobby.filter({ age: { in: [25, 30, 35] } }); console.log("Users aged 25, 30, or 35:", results4); const results5 = await dobby.filter({ name: { ne: 'John Doe' } }, { limit: 2 }); console.log("Up to 2 users not named John Doe:", results5); // Search examples const searchResults1 = await dobby.search("name", "John"); console.log("Users with 'John' in their name:", searchResults1); const searchResults2 = await dobby.search("name", "son", { limit: 1 }); console.log("First user with 'son' in their name:", searchResults2); // You can search in any text column const searchResults3 = await dobby.search("age", "3"); console.log("Users with '3' in their age:", searchResults3); // Example of using the new dropDatabase function await dropDatabase("myDatabase");
0
dthyresson avatar
dthyresson
bedtimeStoriesDb
Script
// query all bedtime stories
0
kj9 avatar
kj9
sqliteDrizzleExample
Script
Forked from stevekrouse/sqliteDrizzleExample
0
dthyresson avatar
dthyresson
processTrackBlobsJob
Cron
processTracksBlobsJob Periodically fetch all Spotify tracks from Blob storage and update the tracks database with a subset of display information. Keys take the format: spotify_track_id:4tVhBXOhSlqYCL2IjyoUNu .
0
dthyresson avatar
dthyresson
resetFavoriteSongSearches
Cron
Reset Favorite Song Searches Cron to clear and reset favoritre Spotify song searches periodically.
0
dthyresson avatar
dthyresson
playMeASong
HTTP
Play me a song Search and if we find it, it'll open the song in Spotify! Feeling Lucky? Play a random song . Like a band? Play one of their tracks.
0
stef avatar
stef
sqliteDrizzleExample
Script
Forked from stevekrouse/sqliteDrizzleExample
0
benlenarts avatar
benlenarts
SongTagger
HTTP
Forked from hunty/spotify
0
alvi avatar
alvi
ownedGamesSchema
Script
Forked from alvi/SteamPlaytimeHistory_playHistorySchema
0
alvi avatar
alvi
createOwnedGamesTable
Script
Forked from alvi/SteamPlaytimeHistory_createPlayHistoryTable
0
niek avatar
niek
cyanGuppy
HTTP
Forked from niek/spotify
0
anthonyec avatar
anthonyec
spotify
HTTP
Forked from hunty/spotify
0
niek avatar
niek
spotify
HTTP
Forked from hunty/spotify
0
hunty avatar
hunty
spotify
HTTP
Forked from stevekrouse/spotify
0
alvi avatar
alvi
SteamPlaytimeHistory_createPlayHistoryTable
Script
This val is part of the SteamPlaytimeHistory project This val allows you to create the play_history table to run the project
0