@adonisjs/lucid
Version:
SQL ORM built on top of Active Record pattern
38 lines (37 loc) • 1.01 kB
TypeScript
import { BaseCommand } from '@adonisjs/core/ace';
import { type CommandOptions } from '@adonisjs/core/types/ace';
export default class DbCreate extends BaseCommand {
static commandName: string;
static description: string;
static options: CommandOptions;
/**
* Choose a custom pre-defined connection. Otherwise, we use the
* default connection
*/
connection: string;
/**
* Not a valid connection
*/
private printNotAValidConnection;
/**
* Run as a subcommand. Never close database connections or exit
* process inside this method
*/
private runAsSubCommand;
/**
* Branching out, so that if required we can implement
* "runAsMain" separately from "runAsSubCommand".
*
* For now, they both are the same
*/
private runAsMain;
/**
* Handle command
*/
run(): Promise<void>;
/**
* Lifecycle method invoked by ace after the "run"
* method.
*/
completed(): Promise<void>;
}