Skip to content

Commit 9cfa79b

Browse files
chore: wip
1 parent d473330 commit 9cfa79b

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

examples/models/User.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const model = defineModel({
99
id: { validation: { rule: v.integer() } },
1010
email: { unique: true, validation: { rule: v.string() } },
1111
name: { validation: { rule: v.string() } },
12+
role: { validation: { rule: v.enum(['admin', 'member', 'guest'] as const) } },
1213
created_at: { validation: { rule: v.date() } },
1314
updated_at: { validation: { rule: v.date() } },
1415
},

examples/test-queries.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ async function simpleSelectQuery() {
4242
async function simpleInsertQuery() {
4343
// TODO: execute after insertion must return ids
4444
const q = await db.insertInto('users').values({ name: 'John Doe', email: '[email protected]', created_at: new Date() }).execute()
45-
4645

4746
console.warn('Results:', q)
4847
}
@@ -53,9 +52,7 @@ export {
5352
db,
5453
meta,
5554
schema,
55+
simpleInsertQuery,
5656
simpleMigration,
5757
simpleSelectQuery,
58-
simpleInsertQuery,
5958
}
60-
61-
await simpleInsertQuery()

0 commit comments

Comments
 (0)