Libraries
    Preparing search index...

    Function clearRow

    • Apply value mappers to the joined fields of a result row in place.

      After an eager-loaded query resolves, joined objects and arrays may contain raw database values that need transformation (e.g. date strings → Date). This function iterates over the one-to-one and one-to-many specs, applies the mappers defined on each spec to the nested data, and returns the mutated row.

      This is an internal helper used by SchemaQueryBuilder's result mapping pipeline. Exported to allow custom post-processing if needed.

      Parameters

      • row: Record<string, any>

        The raw result row (mutated in place).

      • oneSpecs: (ValidatedSpec & { type: "one" })[]

        Validated one-to-one join specs with optional mappers.

      • manySpecs: (ValidatedSpec & { type: "many" })[]

        Validated one-to-many join specs with optional mappers.

      Returns Record<string, any>

      The mutated row object.