34# How it works
35
36This val works by hashing the `userId` and using the resulting value to determine whether a flag should be enabled or disabled. In a 50% rollout, for example, the numeric hash of the `userId` is taken and divided by the maximum hash value. If the result is less than the rollout percentage, the flag is enabled. This allows for completely stateless feature flags, no database required.
37
38To prevent the same users getting features first all of the time, the flag name is prepended to the `userId` before hashing.
6 tableName: "tblRJj6ty16uR9QhC",
7});
8// Sample data from: https://blog.airtable.com/database-vs-spreadsheet/
9const results = await airtable.select();
10console.log(results);
8import { ValTownBlobNotFoundError } from "https://esm.town/v/std/ValTownBlobNotFoundError";
9
10// Initialize the database
11await sqlite.execute(`
12 CREATE TABLE IF NOT EXISTS blobs (
30- [ ] add triggers to sidebar
31- [ ] add upload from SQL, CSV and JSON
32- [ ] add ability to connect to a non-val town Turso database
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable
1# VALL-E-DRAW
2
3LLM code generation for vals, on a canvas! Make apps with a frontend, backend, and database.
4
5* First you need a working version of VALL-E. Follow the steps [here](https://www.val.town/v/janpaul123/VALLE).
1# VALL-E-DRAW
2
3LLM code generation for vals, on a canvas! Make apps with a frontend, backend, and database.
4
5* First you need a working version of VALL-E. Follow the steps [here](https://www.val.town/v/janpaul123/VALLE).
1# VALL-E
2
3LLM code generation for vals! Make apps with a frontend, backend, and database.
4
5It's a bit of work to get this running, but it's worth it.
3
4export let turso = createClient({
5 url: process.env.TURSO_DATABASE_URL,
6 authToken: process.env.TURSO_AUTH_TOKEN,
7});
1# VALL-E
2
3LLM code generation for vals! Make apps with a frontend, backend, and database.
4
5It's a bit of work to get this running, but it's worth it.
30- [ ] add triggers to sidebar
31- [ ] add upload from SQL, CSV and JSON
32- [ ] add ability to connect to a non-val town Turso database
33- [x] fix wonky sidebar separator height problem (thanks to @stevekrouse)
34- [x] make result tables scrollable