prorm API Reference
    Preparing search index...

    Function dataToDiagram

    • Build diagram input by inspecting data — rows from a query, a parsed JSON document, or any object.

      Types are inferred from the values, so pass several rows when you have them: a column that is null in the first row can still be typed from a later one. id is marked PK and a trailing _id / Id is marked FK, which is a naming convention rather than a guarantee — correct it afterwards if it guesses wrong.

      Parameters

      • name: string
      • data: Record<string, unknown> | Record<string, unknown>[]

      Returns ModelDiagramOptions