d1数据迁移

This commit is contained in:
mtvpls
2026-01-30 15:14:07 +08:00
parent c86f9cdca7
commit 465821a6c9
5 changed files with 172 additions and 63 deletions
+7
View File
@@ -7,6 +7,13 @@
* 注意:此模块仅在服务端使用,通过 webpack 配置排除客户端打包
*/
// Cloudflare D1 Database 接口
export interface D1Database {
prepare(query: string): D1PreparedStatement;
batch(statements: any[]): Promise<D1Result[]>;
exec(query: string): Promise<D1Result>;
}
// D1 PreparedStatement 接口
export interface D1PreparedStatement {
bind(...values: any[]): D1PreparedStatement;