UNPKG

@megaorm/cli

Version:

This package allows you to communicate with MegaORM via commands directly from the command line interface (CLI).

29 lines (28 loc) 1.18 kB
import { MegaCommand } from '../MegaCommand'; /** * Represents a command to fetch data from a specific table, with an optional row ID filter. * * The `FetchCommand` is designed to retrieve data from a table in the database. You can * specify a particular row by providing its ID. If no ID is provided, all rows from the table * will be fetched. * * The command performs the following actions: * - Constructs a query to fetch data from the specified table. * - Optionally filters the result by the provided row ID. * * This allows for retrieving specific rows from a table, or fetching all rows if no ID is given. * * @extends MegaCommand */ export declare class FetchCommand extends MegaCommand { protected static syntax: string; /** * Executes the command to fetch data from the specified table, optionally filtering by row ID. * * The command fetches all rows from the specified table. If an ID is provided, it filters * the result to include only the row with the given ID. * * @returns A promise that resolves with the fetched data or rejects with an error if the operation fails. */ static exec(): Promise<unknown>; }