(destination)
| 271 | return Stream.die("executeStream not implemented") |
| 272 | }, |
| 273 | backup(destination) { |
| 274 | return Effect.suspend(() => { |
| 275 | let totalPages = 0 |
| 276 | return Effect.tryPromise({ |
| 277 | try: () => |
| 278 | backupDatabase(db, destination, { |
| 279 | progress: (progress) => { |
| 280 | totalPages = progress.totalPages |
| 281 | } |
| 282 | }).then((pages): BackupMetadata => ({ totalPages: totalPages || pages, remainingPages: 0 })), |
| 283 | catch: (cause) => new SqlError({ reason: classifyError(cause, "Failed to backup database", "backup") }) |
| 284 | }) |
| 285 | }) |
| 286 | }, |
| 287 | loadExtension(path) { |
| 288 | return Effect.acquireUseRelease( |
| 289 | Effect.sync(() => db.enableLoadExtension(true)), |
nothing calls this directly
no test coverage detected