Skip to content

Commit 4dfed35

Browse files
authored
Merge pull request #395 from albnnc/feat/db-commands
feat: ability to run commands directly from DB instance
2 parents b4f6ad8 + fad43e6 commit 4dfed35

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/database.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,4 +128,9 @@ export class Database {
128128
comment: options?.comment,
129129
});
130130
}
131+
132+
// deno-lint-ignore no-explicit-any
133+
runCommand<T = any>(body: Document): Promise<T> {
134+
return this.#cluster.protocol.commandSingle(this.name, body);
135+
}
131136
}

0 commit comments

Comments
 (0)