Class TableTool<DATABASE_DEFINITION, TABLE_NAME, DATABASE, TABLE_DEFINITION, TRANSFORMER>

Type Parameters

  • DATABASE_DEFINITION extends DatabaseDefinition

  • TABLE_NAME extends keyof DATABASE_DEFINITION["tables"] & string

  • DATABASE extends $Database<DATABASE_DEFINITION>

  • TABLE_DEFINITION extends DATABASE_DEFINITION["tables"][TABLE_NAME] = DATABASE_DEFINITION["tables"][TABLE_NAME]

  • TRANSFORMER extends DatabaseTransformer<DATABASE_DEFINITION["tables"][TABLE_NAME], any, any> | undefined = DatabaseTransformer<DATABASE_DEFINITION["tables"][TABLE_NAME], any, any>

Hierarchy

  • TableTool

Constructors

  • Type Parameters

    • DATABASE_DEFINITION extends DatabaseDefinition

    • TABLE_NAME extends string

    • DATABASE extends $Database<DATABASE_DEFINITION, DatabaseTransformerMap<DATABASE_DEFINITION>, DATABASE>

    • TABLE_DEFINITION extends ObjectTypeInformation<Record<string, {
          required: boolean;
          type: AllowAnyTypeInformation;
      }>, TABLE_DEFINITION> = DATABASE_DEFINITION["tables"][TABLE_NAME]

    • TRANSFORMER extends undefined | DatabaseTransformer<DATABASE_DEFINITION["tables"][TABLE_NAME], any, any, PrimitiveType<DATABASE_DEFINITION["tables"][TABLE_NAME]>> = DatabaseTransformer<DATABASE_DEFINITION["tables"][TABLE_NAME], any, any, PrimitiveType<DATABASE_DEFINITION["tables"][TABLE_NAME]>>

    Parameters

    • definition: TABLE_DEFINITION
    • name: TABLE_NAME
    • database: DATABASE

    Returns TableTool<DATABASE_DEFINITION, TABLE_NAME, DATABASE, TABLE_DEFINITION, TRANSFORMER>

Properties

database: DATABASE
definition: TABLE_DEFINITION
name: TABLE_NAME

Methods

  • Parameters

    • __namedParameters: {
          options?: {
              limit?: number;
          };
          search: Partial<GetTransformerInput<TRANSFORMER, PrimitiveType<TABLE_DEFINITION>>>;
      }
      • Optional options?: {
            limit?: number;
        }
        • Optional limit?: number
      • search: Partial<GetTransformerInput<TRANSFORMER, PrimitiveType<TABLE_DEFINITION>>>

    Returns Promise<number>

  • Parameters

    • __namedParameters: {
          options?: {
              ifNotExists?: boolean;
          };
      } = {}
      • Optional options?: {
            ifNotExists?: boolean;
        }
        • Optional ifNotExists?: boolean

    Returns Promise<void>

  • Parameters

    • __namedParameters: {
          options?: {
              limit?: number;
          };
          search: Partial<GetTransformerInput<TRANSFORMER, PrimitiveType<TABLE_DEFINITION>>>;
      }
      • Optional options?: {
            limit?: number;
        }
        • Optional limit?: number
      • search: Partial<GetTransformerInput<TRANSFORMER, PrimitiveType<TABLE_DEFINITION>>>

    Returns Promise<number>

  • Parameters

    • __namedParameters: {
          options?: {
              ifExists?: boolean;
          };
      } = {}
      • Optional options?: {
            ifExists?: boolean;
        }
        • Optional ifExists?: boolean

    Returns Promise<void>

  • Returns Promise<boolean>

  • Parameters

    • __namedParameters: {
          options?: Record<string, never>;
          search: Partial<GetTransformerInput<TRANSFORMER, PrimitiveType<TABLE_DEFINITION>>>;
      }
      • Optional options?: Record<string, never>
      • search: Partial<GetTransformerInput<TRANSFORMER, PrimitiveType<TABLE_DEFINITION>>>

    Returns Promise<Awaited<GetTransformerOutput<DatabaseTransformerMap<DATABASE_DEFINITION>[TABLE_NAME], PrimitiveType<DATABASE_DEFINITION["tables"][TABLE_NAME]>>>[]>

  • Parameters

    • __namedParameters: {
          data: GetTransformerInput<TRANSFORMER, PrimitiveType<TABLE_DEFINITION>>;
          options?: Record<string, never>;
      }
      • data: GetTransformerInput<TRANSFORMER, PrimitiveType<TABLE_DEFINITION>>
      • Optional options?: Record<string, never>

    Returns Promise<void>

  • Parameters

    • __namedParameters: {
          data: GetTransformerInput<TRANSFORMER, PrimitiveType<TABLE_DEFINITION>>;
          options?: {
              limit?: number;
          };
          search: Partial<GetTransformerInput<TRANSFORMER, PrimitiveType<TABLE_DEFINITION>>>;
      }
      • data: GetTransformerInput<TRANSFORMER, PrimitiveType<TABLE_DEFINITION>>
      • Optional options?: {
            limit?: number;
        }
        • Optional limit?: number
      • search: Partial<GetTransformerInput<TRANSFORMER, PrimitiveType<TABLE_DEFINITION>>>

    Returns Promise<number>

Generated using TypeDoc