This commit is contained in:
2026-03-09 06:16:36 +01:00
parent ef54906d9a
commit 40dacc0b62
52 changed files with 1922 additions and 143 deletions
+17 -2
View File
@@ -1,6 +1,9 @@
import type { BUN_SQLITE_DatabaseSchemaType } from "@moduletrace/bun-sqlite/dist/types";
// @ts-check
const schema: BUN_SQLITE_DatabaseSchemaType = {
/**
* @type {import("@moduletrace/nsqlite/dist/types").NSQLITE_DatabaseSchemaType}
*/
const schema = {
dbName: "test-db",
tables: [
{
@@ -18,10 +21,22 @@ const schema: BUN_SQLITE_DatabaseSchemaType = {
fieldName: "email",
dataType: "TEXT",
},
{
fieldName: "username",
dataType: "TEXT",
},
{
fieldName: "image",
dataType: "TEXT",
},
{
fieldName: "password",
dataType: "TEXT",
},
{
fieldName: "is_super_admin",
dataType: "INTEGER",
},
],
},
],
+6 -3
View File
@@ -1,8 +1,8 @@
export const BunSQLiteTables = [
export const NSQLiteTables = [
"users",
] as const
export type BUN_SQLITE_TEST_DB_USERS = {
export type NSQLITE_TEST_DB_USERS = {
/**
* The unique identifier of the record.
*/
@@ -18,7 +18,10 @@ export type BUN_SQLITE_TEST_DB_USERS = {
first_name?: string;
last_name?: string;
email?: string;
username?: string;
image?: string;
password?: string;
is_super_admin?: number;
}
export type BUN_SQLITE_TEST_DB_ALL_TYPEDEFS = BUN_SQLITE_TEST_DB_USERS
export type NSQLITE_TEST_DB_ALL_TYPEDEFS = NSQLITE_TEST_DB_USERS