Hierarchy (view full)

Constructors

Properties

database: string = "giveaways.db"
entityManager: {
    mongodb: typeof MongoGiveaway[];
    mysql: typeof Giveaway[];
    postgres: typeof Giveaway[];
    sqlite: typeof Giveaway[];
} = ...
type?:
    | "mysql"
    | "postgres"
    | "mongodb"
    | "better-sqlite3"
    | "sqlite"
entities: {
    Giveaway: AnyGiveaway;
}
type:
    | "mysql"
    | "postgres"
    | "mongodb"
    | "better-sqlite3"
    | "sqlite"

Methods

  • Returns Promise<DataSource>

  • Deletes an existing giveaway from the database.

    Parameters

    • id: string

      The id of the giveaway to delete.

    Returns Promise<DeleteResult>

  • Finds existing giveaways matching the provided data.

    Parameters

    • Optionaldata: Partial<Omit<IGiveaway, "entries" | "winners" | "previousWinners">>

      The data to use for searching.

    • Optionalamount: number

      The amount of results to return.

    Returns Promise<Giveaway[]>