Skip to content

Commit

Permalink
Merge pull request #395 from albnnc/feat/db-commands
Browse files Browse the repository at this point in the history
feat: ability to run commands directly from DB instance
  • Loading branch information
lucsoft committed Aug 26, 2023
2 parents b4f6ad8 + fad43e6 commit 4dfed35
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/database.ts
Expand Up @@ -128,4 +128,9 @@ export class Database {
comment: options?.comment,
});
}

// deno-lint-ignore no-explicit-any
runCommand<T = any>(body: Document): Promise<T> {
return this.#cluster.protocol.commandSingle(this.name, body);
}
}

0 comments on commit 4dfed35

Please sign in to comment.