Flow diagram
Read this page in the documentation
Flow diagram A read, from the finder you call to the instances you get back. The code What it produces Generated by running the snippet above — this is the generator's real output, rebuilt by scripts/build-diagram-examples.mjs, not a picture of it. <div class="diagram-example"> <!-- Generated by ts-prorm-orm FlowDiagram --> <svg xmlns="http://www.w3.org/2000/svg" width="1400" height="180" viewBox="0 0 1400 180"><defs><marker id="flowArrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M 0 0 L 10 5 L 0 10 z" fill="#000000"/></marker></defs><rect width="1400" height="180" fill="#ffffff"/><text x="32" y="58" font-family="ui-sans-serif, -apple-system, Segoe UI, Helvetica, Arial, sans-serif" font-size="22" font-weight="bold" fill="#000000">findAll()</text><rect x="32" y="68" width="56" height="4" fill="#000000"/><path d="M 208 117 L 236 117 L 236 117 L 264 117" fill="none" stroke="#000000" stroke-width="1" marker-end="url(#flowArrow)"/><path d="M 440 117 L 468 117 L 468 117 L 496 117" fill="none" stroke="#000000" stroke-width="1" marker-end="url(#flowArrow)"/><path d="M 672 117 L 700 117 L 700 117 L 728 117" fill="none" stroke="#000000" stroke-width="1" marker-end="url(#flowArrow)"/><path d="M 904 117 L 932 117 L 932 117 L 960 117" fill="none" stroke="#000000" stroke-width="1" marker-end="url(#flowArrow)"/><path d="M 1136 117 L 1164 117 L 1164 117 L 1192 117" fill="none" stroke="#000000" stroke-width="1" marker-end="url(#flowArrow)"/><rect x="32" y="86" width="176" height="62" fill="#ffffff" stroke="#000000" stroke-width="1"/><text x="120" y="122" font-family="ui-sans-serif, -apple-system, Segoe UI, Helvetica, Arial, sans-serif" font-size="13" font-weight="bold" fill="#000000" text-anchor="middle">findAll(options)</text><rect x="264" y="86" width="176" height="62" fill="#ffffff" stroke="#000000" stroke-width="1"/><text x="352" y="122" font-family="ui-sans-serif, -apple-system, Segoe UI, Helvetica, Arial, sans-serif" font-size="13" font-weight="bold" fill="#000000" text-anchor="middle">resolve includes</text><rect x="496" y="86" width="176" height="62" fill="#ffffff" stroke="#000000" stroke-width="1"/><text x="584" y="122" font-family="ui-sans-serif, -apple-system, Segoe UI, Helvetica, Arial, sans-serif" font-size="13" font-weight="bold" fill="#000000" text-anchor="middle">dialect builds SQL</text><rect x="728" y="86" width="176" height="62" fill="#ffffff" stroke="#000000" stroke-width="1"/><text x="816" y="122" font-family="ui-sans-serif, -apple-system, Segoe UI, Helvetica, Arial, sans-serif" font-size="13" font-weight="bold" fill="#000000" text-anchor="middle">driver executes</text><rect x="960" y="86" width="176" height="62" fill="#ffffff" stroke="#000000" stroke-width="1"/><text x="1048" y="122" font-family="ui-sans-serif, -apple-system, Segoe UI, Helvetica, Arial, sans-serif" font-size="13" font-weight="bold" fill="#000000" text-anchor="middle">coerce values</text><rect x="1192" y="86" width="176" height="62" fill="#ffffff" stroke="#000000" stroke-width="1"/><text x="1280" y="122" font-family="ui-sans-serif, -apple-system, Segoe UI, Helvetica, Arial, sans-serif" font-size="13" font-weight="bold" fill="#000000" text-anchor="middle">model instances</text></svg> </div> Only the "dialect builds SQL" step differs per engine — everything either side of it is shared. Saving it generate() returns the SVG as a string; save(path) writes it straight to disk. Related reading Diagram generators — every generator and its options Models — the definitions these are drawn from