UNPKG

@nikitajs/db

Version:

Provides Nikita actions for various database operations. Currently supports PostgreSQL, MySQL and MariaDB.

19 lines (17 loc) 425 B
// Dependencies import { db } from "@nikitajs/db/utils"; import definitions from "./schema.json" with { type: "json" }; // Action export default { handler: async function({config}) { await this.db.query({ ...db.connection_config(config), command: `DROP USER IF EXISTS ${config.username};` }); }, metadata: { argument_to_config: 'username', global: 'db', definitions: definitions } };