Iskra API Reference
    Preparing search index...

    Function rowSpec

    • A row spec: each field and its column type. The column of a field is from()'s, else the field's name ignoring case, else its UPPER_SNAKE_CASE (idUsuario reads ID_USUARIO). NULL fails a field that is not nullable().

      const Usuario = rowSpec({ id: col.int(), nombre: col.string(), activo: col.boolean(), baja: col.date().nullable() });
      const usuarios = await oracle.query('SELECT id, nombre, activo, baja FROM usuarios', {}, { rows: Usuario });

      Type Parameters

      • S extends Record<string, Column<unknown>>

      Parameters

      Returns RowDecoder<Decoded<S>>