summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.changeset/warm-pets-tap.md5
-rw-r--r--packages/db/src/runtime/index.ts3
-rw-r--r--packages/db/src/runtime/virtual.ts4
3 files changed, 7 insertions, 5 deletions
diff --git a/.changeset/warm-pets-tap.md b/.changeset/warm-pets-tap.md
new file mode 100644
index 000000000..7c388259b
--- /dev/null
+++ b/.changeset/warm-pets-tap.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/db': patch
+---
+
+Export type `Database` from `@astrojs/db/runtime`
diff --git a/packages/db/src/runtime/index.ts b/packages/db/src/runtime/index.ts
index b2c28a644..8737c7d9f 100644
--- a/packages/db/src/runtime/index.ts
+++ b/packages/db/src/runtime/index.ts
@@ -11,7 +11,8 @@ import {
import type { DBColumn, DBTable } from '../core/types.js';
import { type SerializedSQL, isSerializedSQL } from './types.js';
import { pathToFileURL } from './utils.js';
-
+import { type LibSQLDatabase } from 'drizzle-orm/libsql';
+export type Database = Omit<LibSQLDatabase, 'transaction'>;
export type { Table } from './types.js';
export { createRemoteDatabaseClient, createLocalDatabaseClient } from './db-client.js';
diff --git a/packages/db/src/runtime/virtual.ts b/packages/db/src/runtime/virtual.ts
index 4159e74c1..6f008fe0d 100644
--- a/packages/db/src/runtime/virtual.ts
+++ b/packages/db/src/runtime/virtual.ts
@@ -11,10 +11,6 @@ import type {
TextColumnOpts,
} from '../core/types.js';
-import type { LibSQLDatabase } from 'drizzle-orm/libsql';
-
-export type Database = Omit<LibSQLDatabase, 'transaction'>;
-
function createColumn<S extends string, T extends Record<string, unknown>>(type: S, schema: T) {
return {
type,