Class AbstractDAO<T>Abstract

Type Parameters

Hierarchy

Implements

Accessors

  • get info(): {
        idField: T["idFields"];
        name: T["entity"];
        schema: Readonly<{
            [key: string]: SchemaField<Scalars>;
        }>;
    }
  • Returns {
        idField: T["idFields"];
        name: T["entity"];
        schema: Readonly<{
            [key: string]: SchemaField<Scalars>;
        }>;
    }

    • idField: T["idFields"]
    • name: T["entity"]
    • schema: Readonly<{
          [key: string]: SchemaField<Scalars>;
      }>
  • get resolvers(): {
        create: ((params: InsertParams<T>, info: GraphQLResolveInfo) => Promise<PartialDeep<T["model"], {}>>);
        delete: ((params: Record<string, Record<string, unknown>>) => Promise<boolean>);
        read: ((params: Record<string, unknown>, info: GraphQLResolveInfo) => Promise<PartialDeep<T["model"], {}>[]>);
        update: ((params: Record<string, Record<string, unknown>>) => Promise<boolean>);
    }
  • Returns {
        create: ((params: InsertParams<T>, info: GraphQLResolveInfo) => Promise<PartialDeep<T["model"], {}>>);
        delete: ((params: Record<string, Record<string, unknown>>) => Promise<boolean>);
        read: ((params: Record<string, unknown>, info: GraphQLResolveInfo) => Promise<PartialDeep<T["model"], {}>[]>);
        update: ((params: Record<string, Record<string, unknown>>) => Promise<boolean>);
    }

    • create: ((params: InsertParams<T>, info: GraphQLResolveInfo) => Promise<PartialDeep<T["model"], {}>>)
        • (params: InsertParams<T>, info: GraphQLResolveInfo): Promise<PartialDeep<T["model"], {}>>
        • Parameters

          Returns Promise<PartialDeep<T["model"], {}>>

    • delete: ((params: Record<string, Record<string, unknown>>) => Promise<boolean>)
        • (params: Record<string, Record<string, unknown>>): Promise<boolean>
        • Parameters

          • params: Record<string, Record<string, unknown>>

          Returns Promise<boolean>

    • read: ((params: Record<string, unknown>, info: GraphQLResolveInfo) => Promise<PartialDeep<T["model"], {}>[]>)
        • (params: Record<string, unknown>, info: GraphQLResolveInfo): Promise<PartialDeep<T["model"], {}>[]>
        • Parameters

          • params: Record<string, unknown>
          • info: GraphQLResolveInfo

          Returns Promise<PartialDeep<T["model"], {}>[]>

    • update: ((params: Record<string, Record<string, unknown>>) => Promise<boolean>)
        • (params: Record<string, Record<string, unknown>>): Promise<boolean>
        • Parameters

          • params: Record<string, Record<string, unknown>>

          Returns Promise<boolean>

Methods

  • Type Parameters

    Parameters

    Returns Promise<Expand<keyof A["by"] extends never ? { [ K in string | number | symbol]: A["aggregations"][K]["operation"] extends "count" ? number : null | number } : ({ [ K in string | number | symbol]: K extends string ? TypeTraversal<T["insert"], K> : K extends keyof T["insert"] ? T["insert"][K] : never } & { [ K in string | number | symbol]: A["aggregations"][K]["operation"] extends "count" ? number : null | number })[]>>

  • Type Parameters

    • P extends any

    Parameters

    Returns AsyncIterable<Project<T["entity"], T["ast"], T["scalars"], P, T["types"]>>

  • Type Parameters

    • P extends any

    Parameters

    Returns Promise<{
        records: Project<T["entity"], T["ast"], T["scalars"], P, T["types"]>[];
        totalCount: number;
    }>

  • Type Parameters

    • P extends any

    Parameters

    • p: P

    Returns P

  • Type Parameters

    • I extends any

    • P extends any

    Parameters

    • params: {
          input: I;
          options?: T["driverFindOptions"];
          projection: P;
          relations?: T["relations"];
      } & OperationParams<T>

    Returns Promise<I extends unknown[] ? Project<T["entity"], T["ast"], T["scalars"], P, T["types"]>[] : Project<T["entity"], T["ast"], T["scalars"], P, T["types"]>>

Generated using TypeDoc