{
  "id": "task_libraries:orm/javascript",
  "path": "/exapedia/javascript-orm-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "JavaScript ORM libraries",
  "answer": [
    {
      "t": "text",
      "text": "JavaScript ORM (object-relational mapping) libraries map database tables to objects and turn method calls into SQL. These libraries let developers query a database through objects instead of SQL strings, with TypeScript types that catch a misspelled column at compile time."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "JavaScript ORM libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#drizzle-orm",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F133"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#prisma",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F151"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#mongoose",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F167"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#typeorm",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F185"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F189"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#sequelize",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F201"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#mikroorm",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F217"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#objection",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F233"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "npm"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#drizzle-orm",
          "label": [
            {
              "t": "fact",
              "fact": "F133"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F134"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "SQL model mapping",
            "MongoDB model mapping"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#drizzle-orm",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F133"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#prisma",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F151"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F159"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#mongoose",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F167"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F177"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#typeorm",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F185"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F193"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#sequelize",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F201"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#mikroorm",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F217"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F225"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#objection",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F233"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F243"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "drizzle-orm",
          "name": [
            {
              "t": "fact",
              "fact": "F133"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/drizzle-team/drizzle-orm"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/drizzle-orm"
            },
            {
              "label": "Docs",
              "href": "https://orm.drizzle.team/docs/overview"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "Drizzle ORM declares database tables in TypeScript with functions such as "
            },
            {
              "t": "code",
              "text": "pgTable"
            },
            {
              "t": "text",
              "text": " and builds typed queries from them. The "
            },
            {
              "t": "code",
              "text": "select"
            },
            {
              "t": "text",
              "text": " API reads like SQL, with "
            },
            {
              "t": "code",
              "text": "from"
            },
            {
              "t": "text",
              "text": ", "
            },
            {
              "t": "code",
              "text": "leftJoin"
            },
            {
              "t": "text",
              "text": ", and "
            },
            {
              "t": "code",
              "text": "where"
            },
            {
              "t": "text",
              "text": ", while "
            },
            {
              "t": "code",
              "text": "db.query"
            },
            {
              "t": "text",
              "text": " fetches nested related records and still sends one SQL query. Drizzle supports PostgreSQL, MySQL, and SQLite, including serverless databases such as Neon, Turso, and Supabase. A companion command-line tool, Drizzle Kit, generates SQL migration files from the schema or pushes changes straight to the database."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F134"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F142"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://orm.drizzle.team/docs/overview",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F133"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F257"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F258"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F259"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F260"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F150"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/better-auth/better-auth",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F149"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "async count({ model, modelKey = model, where }) {\n\t\t\t\t\tconst table = getSchema(model);\n\t\t\t\t\tconst clause = where\n\t\t\t\t\t\t? convertWhereClause(where, model, modelKey)\n\t\t\t\t\t\t: [];\n\t\t\t\t\tconst res = await db\n\t\t\t\t\t\t.select({ count: count() })\n\t\t\t\t\t\t.from(table)\n\t\t\t\t\t\t.where(...clause);\n\t\t\t\t\treturn res[0].count;\n\t\t\t\t}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/better-auth/better-auth/blob/2a11b2687640211b38ba999fdf791e24af5775a0/packages/drizzle-adapter/src/drizzle-adapter.ts#L1029",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F148"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=drizzle-orm%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F133"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import { drizzle } from \"drizzle-orm/better-sqlite3\";\nconst db = drizzle(\":memory:\");\nconsole.log(db.all(\"select 1 as value\"));\ndb.$client.close();\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://orm.drizzle.team/docs/get-started-sqlite",
                  "label": [
                    {
                      "t": "text",
                      "text": "get-started-sqlite"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F138"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "prisma",
          "name": [
            {
              "t": "fact",
              "fact": "F151"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/prisma/orm"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@prisma/client"
            },
            {
              "label": "Docs",
              "href": "https://www.prisma.io/docs/orm/v7/prisma-client"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "Prisma describes the database in a schema file, "
            },
            {
              "t": "code",
              "text": "schema.prisma"
            },
            {
              "t": "text",
              "text": ", and "
            },
            {
              "t": "code",
              "text": "prisma generate"
            },
            {
              "t": "text",
              "text": " turns its models into Prisma Client, a typed query library. Queries are method calls on that client, such as "
            },
            {
              "t": "code",
              "text": "prisma.user.findMany"
            },
            {
              "t": "text",
              "text": ", and nested writes create or update related records in one transaction. Prisma Migrate turns schema changes into SQL migration files. The next major version, a TypeScript rewrite of the ORM, is a release candidate, and the current version stays maintained on its own branch."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F158"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://www.prisma.io/docs/orm/v7/prisma-client",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F151"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F20"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/calcom/cal.diy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F165"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "async function changeSMSLockState(identifier: string, status: SMSLockState) {\n  let userId: number | undefined, teamId: number | undefined;\n\n  if (identifier.startsWith(\"sms:user:\")) {\n    userId = Number(identifier.slice(9));\n  } else if (identifier.startsWith(\"sms:team:\")) {\n    teamId = Number(identifier.slice(9));\n  }\n\n  if (userId) {\n    const user = await prisma.user.findUnique({ where: { id: userId, profiles: { none: {} } } });\n    if (user?.smsLockReviewedByAdmin) return;\n\n    await prisma.user.update({\n      where: {\n        id: userId,\n        profiles: { none: {} },\n      },\n      data: {\n        smsLockState: status,\n      },\n    });\n  } else {\n    const team = await prisma.team.findUnique({\n      where: { id: teamId, parentId: null, isOrganization: false },\n    });\n    if (team?.smsLockReviewedByAdmin) return;\n\n    await prisma.team.update({\n      where: {\n        id: teamId,\n        parentId: null,\n        isOrganization: false,\n      },\n      data: {\n        smsLockState: status,\n      },\n    });\n  }\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/calcom/cal.diy/blob/ae027bb70e694e2d2c44569f398d6cbcee0389b1/packages/lib/smsLockState.ts#L25",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F164"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20application%20%40prisma/client%20models%20entity%20relations%20persistence%20migrations%20database%20ORM&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F151"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "npm pkg set type=module\nmkdir -p prisma\ncat > prisma/schema.prisma <<'SCHEMA'\ngenerator client {\n  provider = \"prisma-client\"\n  output = \"../generated/prisma\"\n}\ndatasource db {\n  provider = \"sqlite\"\n}\nmodel User {\n  id Int @id @default(autoincrement())\n  name String\n}\nSCHEMA\ncat > prisma7.config.ts <<'CONFIG'\nimport { defineConfig } from \"prisma/config\";\nimport { resolve } from \"node:path\";\nexport default defineConfig({ schema: \"prisma/schema.prisma\", datasource: { url: \"file:\" + resolve(\"orm-demo.db\") } });\nCONFIG\nnpx prisma migrate dev --name init\nnpx prisma generate\ncat > app.ts <<'APP'\nimport { PrismaClient } from \"./generated/prisma/client\";\nimport { PrismaBetterSqlite3 } from \"@prisma/adapter-better-sqlite3\";\nimport { resolve } from \"node:path\";\nconst prisma = new PrismaClient({ adapter: new PrismaBetterSqlite3({ url: \"file:\" + resolve(\"orm-demo.db\") }) });\nconsole.log(await prisma.user.create({ data: { name: \"Ada\" } }));\nawait prisma.$disconnect();\nAPP\nnpx tsx app.ts\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://www.prisma.io/docs/getting-started/prisma-orm/quickstart/sqlite",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F156"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "mongoose",
          "name": [
            {
              "t": "fact",
              "fact": "F167"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/Automattic/mongoose"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/mongoose"
            },
            {
              "label": "Docs",
              "href": "https://mongoosejs.com/docs/index.html"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "Mongoose models MongoDB documents in Node.js and, in alpha, Deno. Every model starts as a schema: "
            },
            {
              "t": "code",
              "text": "new mongoose.Schema"
            },
            {
              "t": "text",
              "text": " lists the fields and their types, and "
            },
            {
              "t": "code",
              "text": "mongoose.model"
            },
            {
              "t": "text",
              "text": " compiles the schema into a model. Models create, find, update, and delete documents, and each document is an instance of its model. The app opens the database with "
            },
            {
              "t": "code",
              "text": "mongoose.connect"
            },
            {
              "t": "text",
              "text": " and a MongoDB connection string."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F176"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F170"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://mongoosejs.com/docs/index.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F167"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F263"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F264"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F265"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F266"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F183"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/novuhq/novu",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F183"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "async findOneAndDelete(query: FilterQuery<T_DBModel> & T_Enforcement): Promise<T_MappedEntity | null> {\n    const data = await this.MongooseModel.findOneAndDelete(query).lean();\n    if (!data) return null;\n\n    return this.mapEntity(data);\n  }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/novuhq/novu/blob/fd9c697630696b96249b8d1eb57de402c3bf3bb0/libs/dal/src/repositories/base-repository.ts#L222",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F182"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=mongoose%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F167"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "const mongoose = require(\"mongoose\");\nasync function main() {\n  await mongoose.connect(\"mongodb://127.0.0.1:27017/orm_demo\");\n  const Kitten = mongoose.model(\"Kitten\", new mongoose.Schema({ name: String }));\n  console.log(await Kitten.findOne({ name: \"Silence\" }));\n  await mongoose.disconnect();\n}\nmain().catch(console.error);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://mongoosejs.com/docs/index.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "index.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F172"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "typeorm",
          "name": [
            {
              "t": "fact",
              "fact": "F185"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/typeorm/typeorm"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/typeorm"
            },
            {
              "label": "Docs",
              "href": "https://typeorm.io/docs/entity/separating-entity-definition/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "TypeORM maps classes to tables with decorators such as "
            },
            {
              "t": "code",
              "text": "@Entity"
            },
            {
              "t": "text",
              "text": " and "
            },
            {
              "t": "code",
              "text": "@Column"
            },
            {
              "t": "text",
              "text": ", or with "
            },
            {
              "t": "code",
              "text": "EntitySchema"
            },
            {
              "t": "text",
              "text": " objects in plain JavaScript. Queries run through repositories, the Data Mapper pattern, or through methods on the entities themselves, the Active Record pattern. A "
            },
            {
              "t": "code",
              "text": "DataSource"
            },
            {
              "t": "text",
              "text": " holds the connection settings for one of many databases, including PostgreSQL, MySQL, SQLite, Microsoft SQL Server, Oracle, and MongoDB. The library also generates migrations, builds joins with its "
            },
            {
              "t": "code",
              "text": "QueryBuilder"
            },
            {
              "t": "text",
              "text": ", and runs in Node.js, browsers, React Native, and Electron."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F188"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F187"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://typeorm.io/docs/entity/separating-entity-definition/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F185"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F46"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F199"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F200"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/MichalLytek/type-graphql",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F199"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "export async function seedDatabase() {\n  const recipeRepository = dataSource.getRepository(Recipe);\n  const ratingRepository = dataSource.getRepository(Rating);\n  const userRepository = dataSource.getRepository(User);\n\n  const defaultUser = userRepository.create({\n    email: \"admin@github.com\",\n    nickname: \"administrator\",\n    password: \"s3cr3tp4ssw0rd\",\n  });\n  await userRepository.save(defaultUser);\n\n  const recipes = recipeRepository.create([\n    {\n      title: \"Recipe 1\",\n      description: \"Desc 1\",\n      author: defaultUser,\n      ratings: ratingRepository.create([\n        { value: 2, user: defaultUser },\n        { value: 4, user: defaultUser },\n        { value: 5, user: defaultUser },\n        { value: 3, user: defaultUser },\n        { value: 4, user: defaultUser },\n      ]),\n    },\n    {\n      title: \"Recipe 2\",\n      author: defaultUser,\n      ratings: ratingRepository.create([\n        { value: 2, user: defaultUser },\n        { value: 4, user: defaultUser },\n      ]),\n    },\n  ]);\n  await recipeRepository.save(recipes);\n\n  return {\n    defaultUser,\n  };\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/MichalLytek/type-graphql/blob/77a79f2e13a39185a8669087497dcf626bb2f285/examples/typeorm-basic-usage/helpers.ts#L4",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F198"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20application%20typeorm%20models%20entity%20relations%20persistence%20migrations%20database%20ORM&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F185"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { DataSource, EntitySchema } from \"typeorm\";\nconst User = new EntitySchema({ name: \"User\", columns: { id: { type: Number, primary: true, generated: true }, name: { type: String } } });\nconst db = new DataSource({ type: \"sqlite\", database: \":memory:\", entities: [User], synchronize: true });\nawait db.initialize();\nconsole.log(await db.getRepository(User).save({ name: \"Ada\" }));\nawait db.destroy();\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://typeorm.io/docs/entity/separating-entity-definition/",
                  "label": [
                    {
                      "t": "text",
                      "text": "getting-started.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F190"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "sequelize",
          "name": [
            {
              "t": "fact",
              "fact": "F201"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/sequelize/sequelize"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/sequelize"
            },
            {
              "label": "Docs",
              "href": "https://sequelize.org/docs/v6/getting-started/"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "Sequelize is a promise-based ORM for PostgreSQL, MySQL, MariaDB, SQLite, Microsoft SQL Server, Snowflake, and Oracle Database. A model represents a table and is defined with "
            },
            {
              "t": "code",
              "text": "sequelize.define"
            },
            {
              "t": "text",
              "text": " or by extending the "
            },
            {
              "t": "code",
              "text": "Model"
            },
            {
              "t": "text",
              "text": " class. Associations such as "
            },
            {
              "t": "code",
              "text": "hasOne"
            },
            {
              "t": "text",
              "text": " and "
            },
            {
              "t": "code",
              "text": "belongsTo"
            },
            {
              "t": "text",
              "text": " add methods for reading and creating related records, which load eagerly or lazily. Transactions and read replication are built in. The maintainers are looking for help to finish the next major version, which is in alpha."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://sequelize.org/docs/v6/getting-started/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F201"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F71"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F72"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/hedgedoc/hedgedoc",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F215"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "async function updatePasswordHashHook (user, options) {\n    // suggested way to hash passwords to be able to do this asynchronously:\n    // @see https://github.com/sequelize/sequelize/issues/1821#issuecomment-44265819\n\n    if (!user.changed('password')) {\n      return Promise.resolve()\n    }\n\n    return Scrypt.kdf(user.getDataValue('password'), { logN: 15 }).then(keyBuf => {\n      user.setDataValue('password', Buffer.from(keyBuf).toString('hex'))\n    })\n  }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/hedgedoc/hedgedoc/blob/dbb71bae523af1dfba30006e4922143d8004f741/lib/models/user.js#L194",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F214"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20application%20sequelize%20models%20entity%20relations%20persistence%20migrations%20database%20ORM&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F201"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "const { Sequelize, DataTypes } = require(\"sequelize\");\nasync function main() {\n  const db = new Sequelize(\"sqlite::memory:\", { logging: false });\n  const User = db.define(\"User\", { name: DataTypes.STRING });\n  await db.sync();\n  console.log((await User.create({ name: \"Ada\" })).toJSON());\n  await db.close();\n}\nmain().catch(console.error);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://sequelize.org/docs/v6/getting-started/",
                  "label": [
                    {
                      "t": "text",
                      "text": "model-basics.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F206"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "mikroorm",
          "name": [
            {
              "t": "fact",
              "fact": "F217"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/mikro-orm/mikro-orm"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@mikro-orm/core"
            },
            {
              "label": "Docs",
              "href": "https://mikro-orm.io/docs/quick-start"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "MikroORM is a TypeScript ORM built on three patterns from Doctrine and Hibernate: Data Mapper, Unit of Work, and Identity Map. Entities are defined with "
            },
            {
              "t": "code",
              "text": "defineEntity"
            },
            {
              "t": "text",
              "text": ", decorators, or "
            },
            {
              "t": "code",
              "text": "EntitySchema"
            },
            {
              "t": "text",
              "text": ". The entity manager, "
            },
            {
              "t": "code",
              "text": "em"
            },
            {
              "t": "text",
              "text": ", tracks every entity it loads or creates, and "
            },
            {
              "t": "code",
              "text": "em.flush"
            },
            {
              "t": "text",
              "text": " writes all changes in a single transaction. Each database has its own driver package, such as "
            },
            {
              "t": "code",
              "text": "@mikro-orm/postgresql"
            },
            {
              "t": "text",
              "text": " or "
            },
            {
              "t": "code",
              "text": "@mikro-orm/mongodb"
            },
            {
              "t": "text",
              "text": ", and "
            },
            {
              "t": "code",
              "text": "RequestContext"
            },
            {
              "t": "text",
              "text": " gives each web request its own identity map."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F219"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://mikro-orm.io/docs/quick-start",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F217"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F91"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F93"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F94"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F95"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F96"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F97"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F98"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/mikro-orm/nestjs-realworld-example-app",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F231"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "async update(id: number, dto: UpdateUserDto) {\n    const user = await this.userRepository.findOneOrFail(id);\n    this.em.assign(user, dto);\n    await this.em.flush();\n\n    return this.buildUserRO(user);\n  }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/mikro-orm/nestjs-realworld-example-app/blob/3bb628edebc95da30adcbeeb2ecb33158c3dbc95/src/user/user.service.ts#L76",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F230"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20TypeScript%20application%20%40mikro-orm/core%20models%20entity%20relations%20persistence%20migrations%20database%20ORM&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F217"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { defineEntity, p } from \"@mikro-orm/core\";\nimport { MikroORM } from \"@mikro-orm/sqlite\";\nconst User = defineEntity({ name: \"User\", properties: { id: p.integer().primary(), name: p.string() } });\nconst orm = await MikroORM.init({ entities: [User], dbName: \":memory:\" });\nawait orm.schema.create();\nconst em = orm.em.fork();\nconst user = em.create(User, { name: \"Ada\" });\nem.persist(user);\nawait em.flush();\nconsole.log(user);\nawait orm.close(true);\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://mikro-orm.io/docs/quick-start",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F222"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "objection",
          "name": [
            {
              "t": "fact",
              "fact": "F233"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/ditojs/objection"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/objection"
            },
            {
              "label": "Docs",
              "href": "https://raw.githubusercontent.com/ditojs/objection/main/README.md"
            }
          ],
          "what": [
            {
              "t": "text",
              "text": "Objection.js is a relational query builder built on knex, so it connects to every database knex supports. Models extend the "
            },
            {
              "t": "code",
              "text": "Model"
            },
            {
              "t": "text",
              "text": " class and declare their relations to other models. Queries use knex-style methods, eager loading fetches related records, and whole object graphs can be inserted or upserted at once. Schema changes stay outside the library, in knex migrations. Development continues at ditojs/objection under the same package name after the original repository changed hands."
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/ditojs/objection/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F233"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F267"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F268"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F269"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F270"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/Vincit/objection-graphql",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F249"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "_buildEagerSegment(astNode, modelClass, astRoot) {\n    const filters = {};\n    const relations = modelClass.getRelations();\n    let expression = '';\n\n    for (let i = 0, l = astNode.selectionSet.selections.length; i < l; i += 1) {\n      const selectionNode = astNode.selectionSet.selections[i];\n      const relation = relations[selectionNode.name.value];\n\n      if (relation) {\n        expression = this._buildEagerRelationSegment(selectionNode, relation, expression, filters, astRoot);\n      } else if (selectionNode.kind === KIND_FRAGMENT_SPREAD) {\n        expression = this._buildEagerFragmentSegment(selectionNode, modelClass, expression, filters, astRoot);\n      }\n    }\n\n    return {\n      expression,\n      filters,\n    };\n  }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/Vincit/objection-graphql/blob/70a8359852a765828af7f7099461068ced5e468d/lib/SchemaBuilder.js#L311",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F248"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=objection%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F233"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import { Model } from \"objection\";\nimport Knex from \"knex\";\nconst knex = Knex({ client: \"sqlite3\", connection: { filename: \":memory:\" }, useNullAsDefault: true });\nModel.knex(knex);\nclass Person extends Model { static get tableName() { return \"persons\"; } }\nawait knex.schema.createTable(\"persons\", table => { table.increments(\"id\"); table.string(\"firstName\"); });\nconsole.log(await Person.query().insert({ firstName: \"Ada\" }));\nawait knex.destroy();\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://ditojs.github.io/objection/guide/getting-started.html",
                  "label": [
                    {
                      "t": "text",
                      "text": "getting-started.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F238"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which JavaScript ORM should I use?",
      "a": [
        {
          "t": "text",
          "text": "On a SQL database with TypeScript, most projects choose between "
        },
        {
          "t": "link",
          "href": "#prisma",
          "label": [
            {
              "t": "text",
              "text": "Prisma"
            }
          ]
        },
        {
          "t": "text",
          "text": " and "
        },
        {
          "t": "link",
          "href": "#drizzle-orm",
          "label": [
            {
              "t": "text",
              "text": "Drizzle ORM"
            }
          ]
        },
        {
          "t": "text",
          "text": ". Prisma generates a client from a schema file, while Drizzle keeps the schema and queries in TypeScript. "
        },
        {
          "t": "link",
          "href": "#typeorm",
          "label": [
            {
              "t": "text",
              "text": "TypeORM"
            }
          ]
        },
        {
          "t": "text",
          "text": " and "
        },
        {
          "t": "link",
          "href": "#mikroorm",
          "label": [
            {
              "t": "text",
              "text": "MikroORM"
            }
          ]
        },
        {
          "t": "text",
          "text": " organize code around entity classes, a pattern taken from Hibernate and Doctrine. For MongoDB, use "
        },
        {
          "t": "link",
          "href": "#mongoose",
          "label": [
            {
              "t": "text",
              "text": "Mongoose"
            }
          ]
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "q": "Drizzle vs Prisma: which should I use?",
      "a": [
        {
          "t": "text",
          "text": "Drizzle declares the schema in TypeScript, has no dependencies, and offers both SQL-like and relational query APIs. Prisma reads a separate schema file and needs "
        },
        {
          "t": "code",
          "text": "prisma generate"
        },
        {
          "t": "text",
          "text": " after each model change to rebuild its typed client. Both produce migrations, Drizzle through Drizzle Kit and Prisma through Prisma Migrate."
        }
      ]
    },
    {
      "q": "TypeORM vs Prisma: which should I use?",
      "a": [
        {
          "t": "text",
          "text": "TypeORM maps decorated classes to tables and supports both the Active Record and Data Mapper patterns, so queries run through entity methods or repositories. Prisma has no entity classes. Its query methods are generated from the models in the schema file."
        }
      ]
    },
    {
      "q": "Sequelize vs TypeORM: which should I use?",
      "a": [
        {
          "t": "text",
          "text": "Both map tables to models and handle relations, transactions, and migrations. TypeORM declares entities with TypeScript decorators and also connects to MongoDB. Sequelize defines models with "
        },
        {
          "t": "code",
          "text": "sequelize.define"
        },
        {
          "t": "text",
          "text": " or by extending "
        },
        {
          "t": "code",
          "text": "Model"
        },
        {
          "t": "text",
          "text": ", and its TypeScript docs call for manual type declarations."
        }
      ]
    },
    {
      "q": "What is the difference between an ORM and a query builder?",
      "a": [
        {
          "t": "text",
          "text": "A query builder such as knex turns chained method calls into SQL. An ORM adds models, relations between them, and loading of related records. "
        },
        {
          "t": "link",
          "href": "#objection",
          "label": [
            {
              "t": "text",
              "text": "Objection.js"
            }
          ]
        },
        {
          "t": "text",
          "text": " sits between the two: it is built on knex and adds models and relations while keeping SQL as the query language."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, @prisma/client",
      "display": "Prisma",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, @prisma/client",
      "display": "93.8M",
      "asOf": "2026-11-15"
    },
    "F3": {
      "label": "License, @prisma/client",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, @prisma/client",
      "display": "7.10.1",
      "asOf": "2026-11-17"
    },
    "F5": {
      "label": "Undated package release, @prisma/client",
      "display": "v7.10.1",
      "asOf": "2026-11-17"
    },
    "F6": {
      "label": "Repository stars, @prisma/client",
      "display": "47.7K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Model mapping, @prisma/client",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Loads relations, @prisma/client",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Transactions, @prisma/client",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Schema migrations, @prisma/client",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, @prisma/client",
      "display": "npm install @prisma/client",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, @prisma/client",
      "display": "Combines a generated, typed database client with declarative models, and migration tooling.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, @prisma/client",
      "display": "Generates a model-specific client",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, @prisma/client",
      "display": "Get query methods and types from the declared database models.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, @prisma/client",
      "display": "Rolls back failed nested writes",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, @prisma/client",
      "display": "Create related records together with transactional guarantees.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, @prisma/client",
      "display": "Requires client regeneration after changes",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, @prisma/client",
      "display": "Run prisma generate after changing models or generator settings.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations lead, @prisma/client",
      "display": "Migrate excludes MongoDB",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations, @prisma/client",
      "display": "Use db push for MongoDB schema changes.",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Quickstart, @prisma/client",
      "display": "import { PrismaClient } from './generated/client'\nimport { PrismaPg } from '@prisma/adapter-pg'\n\nconst adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })\nconst prisma = new PrismaClient({ adapter })\n\nconst allUsers = await prisma.user.findMany({\n  include: { posts: true },\n})\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function, @prisma/client",
      "display": "async function changeSMSLockState(identifier: string, status: SMSLockState) {\n  let userId: number | undefined, teamId: number | undefined;\n\n  if (identifier.startsWith(\"sms:user:\")) {\n    userId = Number(identifier.slice(9));\n  } else if (identifier.startsWith(\"sms:team:\")) {\n    teamId = Number(identifier.slice(9));\n  }\n\n  if (userId) {\n    const user = await prisma.user.findUnique({ where: { id: userId, profiles: { none: {} } } });\n    if (user?.smsLockReviewedByAdmin) return;\n\n    await prisma.user.update({\n      where: {\n        id: userId,\n        profiles: { none: {} },\n      },\n      data: {\n        smsLockState: status,\n      },\n    });\n  } else {\n    const team = await prisma.team.findUnique({\n      where: { id: teamId, parentId: null, isOrganization: false },\n    });\n    if (team?.smsLockReviewedByAdmin) return;\n\n    await prisma.team.update({\n      where: {\n        id: teamId,\n        parentId: null,\n        isOrganization: false,\n      },\n      data: {\n        smsLockState: status,\n      },\n    });\n  }\n}\n",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function reference, @prisma/client",
      "display": "smsLockState.ts · changeSMSLockState()",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project repository, @prisma/client",
      "display": "calcom/cal.diy",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project stars, calcom/cal.diy",
      "display": "50.1K",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project push date, calcom/cal.diy",
      "display": "Nov 2026",
      "asOf": "2026-11-13"
    },
    "F27": {
      "label": "Library name, typeorm",
      "display": "TypeORM",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Monthly downloads, typeorm",
      "display": "26.0M",
      "asOf": "2026-11-15"
    },
    "F29": {
      "label": "License, typeorm",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Package release, typeorm",
      "display": "1.1.3",
      "asOf": "2026-11-17"
    },
    "F31": {
      "label": "Undated package release, typeorm",
      "display": "v1.1.3",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Repository stars, typeorm",
      "display": "36.7K",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Model mapping, typeorm",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Loads relations, typeorm",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Transactions, typeorm",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Schema migrations, typeorm",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "Install, typeorm",
      "display": "npm install typeorm",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "What it does, typeorm",
      "display": "Maps classes to database entities and supports repository-based or entity-based persistence.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, typeorm",
      "display": "Offers two persistence styles",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, typeorm",
      "display": "Use entity methods or repositories to organize database operations.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths lead, typeorm",
      "display": "Loads mapped relations with records",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "strengths, typeorm",
      "display": "Include related entities through find options.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, typeorm",
      "display": "Schema synchronization risks production data",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, typeorm",
      "display": "Use migrations instead of synchronize for production schema changes.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations lead, typeorm",
      "display": "QueryBuilder disables eager loading",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "limitations, typeorm",
      "display": "Add leftJoinAndSelect when a QueryBuilder query needs an eager relation.",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Quickstart, typeorm",
      "display": "import { Photo } from \"./entity/Photo\"\nimport { AppDataSource } from \"./index\"\n\nconst photoRepository = AppDataSource.getRepository(Photo)\nconst allPhotos = await photoRepository.find()\nconsole.log(\"All photos from the db: \", allPhotos)\n\nconst firstPhoto = await photoRepository.findOneBy({\n    id: 1,\n})\nconsole.log(\"First photo from the db: \", firstPhoto)\n\nconst meAndBearsPhoto = await photoRepository.findOneBy({\n    name: \"Me and Bears\",\n})\nconsole.log(\"Me and Bears photo from the db: \", meAndBearsPhoto)\n\nconst allViewedPhotos = await photoRepository.findBy({ views: 1 })\nconsole.log(\"All viewed photos: \", allViewedPhotos)\n\nconst allPublishedPhotos = await photoRepository.findBy({ isPublished: true })\nconsole.log(\"All published photos: \", allPublishedPhotos)\n\nconst [photos, photosCount] = await photoRepository.findAndCount()\nconsole.log(\"All photos: \", photos)\nconsole.log(\"Photos count: \", photosCount)\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function, typeorm",
      "display": "export async function seedDatabase() {\n  const recipeRepository = dataSource.getRepository(Recipe);\n  const ratingRepository = dataSource.getRepository(Rating);\n  const userRepository = dataSource.getRepository(User);\n\n  const defaultUser = userRepository.create({\n    email: \"admin@github.com\",\n    nickname: \"administrator\",\n    password: \"s3cr3tp4ssw0rd\",\n  });\n  await userRepository.save(defaultUser);\n\n  const recipes = recipeRepository.create([\n    {\n      title: \"Recipe 1\",\n      description: \"Desc 1\",\n      author: defaultUser,\n      ratings: ratingRepository.create([\n        { value: 2, user: defaultUser },\n        { value: 4, user: defaultUser },\n        { value: 5, user: defaultUser },\n        { value: 3, user: defaultUser },\n        { value: 4, user: defaultUser },\n      ]),\n    },\n    {\n      title: \"Recipe 2\",\n      author: defaultUser,\n      ratings: ratingRepository.create([\n        { value: 2, user: defaultUser },\n        { value: 4, user: defaultUser },\n      ]),\n    },\n  ]);\n  await recipeRepository.save(recipes);\n\n  return {\n    defaultUser,\n  };\n}\n",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project function reference, typeorm",
      "display": "helpers.ts · seedDatabase()",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project repository, typeorm",
      "display": "MichalLytek/type-graphql",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project stars, MichalLytek/type-graphql",
      "display": "8.1K",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Project push date, MichalLytek/type-graphql",
      "display": "Jul 2026",
      "asOf": "2026-07-16"
    },
    "F53": {
      "label": "Library name, sequelize",
      "display": "Sequelize",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Monthly downloads, sequelize",
      "display": "15.3M",
      "asOf": "2026-11-15"
    },
    "F55": {
      "label": "License, sequelize",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Package release, sequelize",
      "display": "6.37.8",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Undated package release, sequelize",
      "display": "v6.37.8",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Repository stars, sequelize",
      "display": "30.3K",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Model mapping, sequelize",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Loads relations, sequelize",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Transactions, sequelize",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "Schema migrations, sequelize",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "Install, sequelize",
      "display": "npm install sequelize",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "What it does, sequelize",
      "display": "Maps database tables to JavaScript model classes.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, sequelize",
      "display": "Defines models with plain objects",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, sequelize",
      "display": "Pass attribute definitions to sequelize.define to create a mapped model.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "strengths lead, sequelize",
      "display": "Adds methods for associated records",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "strengths, sequelize",
      "display": "Use generated getters, setters, and creators on the association source.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations lead, sequelize",
      "display": "TypeScript models need explicit declarations",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations, sequelize",
      "display": "Declare model attributes by hand, since types aren't generated from a schema.",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "limitations lead, sequelize",
      "display": "Reverse loading needs paired associations",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "limitations, sequelize",
      "display": "Define the reverse association before including the source from its target.",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Quickstart, sequelize",
      "display": "const { Sequelize, DataTypes } = require('sequelize');\nconst sequelize = new Sequelize('sqlite::memory:');\n\nconst User = sequelize.define(\n  'User',\n  {\n    // Model attributes are defined here\n    firstName: {\n      type: DataTypes.STRING,\n      allowNull: false,\n    },\n    lastName: {\n      type: DataTypes.STRING,\n      // allowNull defaults to true\n    },\n  },\n  {\n    // Other model options go here\n  },\n);\n\n// `sequelize.define` also returns the model\nconsole.log(User === sequelize.models.User); // true\n",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project function, sequelize",
      "display": "function (models) {\n    User.hasMany(models.Note, {\n      foreignKey: 'ownerId',\n      constraints: false\n    })\n    User.hasMany(models.Note, {\n      foreignKey: 'lastchangeuserId',\n      constraints: false\n    })\n  }\n",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project function reference, sequelize",
      "display": "user.js · associate()",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Project repository, sequelize",
      "display": "hedgedoc/hedgedoc",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Project stars, hedgedoc/hedgedoc",
      "display": "7.5K",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Project push date, hedgedoc/hedgedoc",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F79": {
      "label": "Library name, @mikro-orm/core",
      "display": "MikroORM",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Monthly downloads, @mikro-orm/core",
      "display": "5.6M",
      "asOf": "2026-11-15"
    },
    "F81": {
      "label": "License, @mikro-orm/core",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Package release, @mikro-orm/core",
      "display": "7.2.10",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Undated package release, @mikro-orm/core",
      "display": "v7.2.10",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Repository stars, @mikro-orm/core",
      "display": "9.3K",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "Model mapping, @mikro-orm/core",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Loads relations, @mikro-orm/core",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "Transactions, @mikro-orm/core",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "Schema migrations, @mikro-orm/core",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "Install, @mikro-orm/core",
      "display": "npm install @mikro-orm/core",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "What it does, @mikro-orm/core",
      "display": "Uses a data mapper, identity map, and unit of work for database entities.",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "strengths lead, @mikro-orm/core",
      "display": "Tracks changes across managed entities",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "strengths, @mikro-orm/core",
      "display": "Modify loaded objects and flush to write their changed fields.",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "strengths lead, @mikro-orm/core",
      "display": "Reuses one entity instance",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "strengths, @mikro-orm/core",
      "display": "Compare loaded records by object identity within a request.",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "limitations lead, @mikro-orm/core",
      "display": "Requires a separate request context",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "limitations, @mikro-orm/core",
      "display": "Fork the entity manager for each concurrent request.",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "limitations lead, @mikro-orm/core",
      "display": "Collections need loading before access",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "limitations, @mikro-orm/core",
      "display": "getItems throws on a collection that isn't loaded, so populate the relation first.",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Quickstart, @mikro-orm/core",
      "display": "import { defineEntity, p, MikroORM } from '@mikro-orm/postgresql';\n\nconst AuthorSchema = defineEntity({\n  name: 'Author',\n  properties: {\n    id: p.integer().primary(),\n    name: p.string(),\n    email: p.string(),\n    born: p.datetime().nullable(),\n    books: () => p.oneToMany(Book).mappedBy('author'),\n  },\n});\n\nexport class Author extends AuthorSchema.class {}\nAuthorSchema.setClass(Author);\n\nconst BookSchema = defineEntity({\n  name: 'Book',\n  properties: {\n    id: p.integer().primary(),\n    title: p.string(),\n    author: () => p.manyToOne(Author).inversedBy('books'),\n  },\n});\n\nexport class Book extends BookSchema.class {}\nBookSchema.setClass(Book);\n",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Developer need",
      "display": "Typed client from a schema file",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Why choose @prisma/client",
      "display": "generates query methods from declared models",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Developer need in introduction",
      "display": "schema-generated client methods",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "When to consider @mikro-orm/core",
      "display": "tracked object changes should be collected before persistence",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Developer need",
      "display": "Repositories or entity methods",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Why choose typeorm",
      "display": "Active Record or Data Mapper patterns",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Developer need in introduction",
      "display": "repositories or entity methods",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need",
      "display": "Plain JavaScript model definitions",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Why choose sequelize",
      "display": "models defined from attribute objects",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Developer need in introduction",
      "display": "plain JavaScript model definitions",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "When to consider @prisma/client",
      "display": "schema-generated types matter more than manual model declarations",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Developer need",
      "display": "Tracked entity changes",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Why choose @mikro-orm/core",
      "display": "writes changed fields on flush",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "Developer need in introduction",
      "display": "tracked entity changes",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "When to consider typeorm",
      "display": "explicit repository operations fit the application better",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "Page introduction",
      "display": "JavaScript ORM libraries let application developers query relational data through application models.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: What distinguishes these ORMs from SQL query builders?",
      "display": "TypeORM maps decorated model classes to entities and supports entity persistence operations.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: What distinguishes these ORMs from SQL query builders?",
      "display": "MikroORM tracks managed objects and compares their fields when flush is called.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: What distinguishes these ORMs from SQL query builders?",
      "display": "Sequelize models represent database tables and expose model-specific operations.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Which Prisma version does this comparison describe?",
      "display": "The captured published Prisma Client version is7.10.1; the starter comes from that release README.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Which Prisma version does this comparison describe?",
      "display": "Use its configured generated-client output path and regenerate after schema or generator changes.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Do Prisma nested writes share a transaction?",
      "display": "Nested writes can create, update or delete related data in a single client query and roll back all changes when a part fails.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Does Promise.all parallelize Prisma queries inside one interactive transaction?",
      "display": "Queries inside the transaction execute serially even when wrapped with Promise.all.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Does Prisma Migrate apply to MongoDB?",
      "display": "Use db push for MongoDB; Prisma Migrate and migrate dev do not apply there.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: How does TypeORM support different persistence styles?",
      "display": "TypeORM supports both Active Record, where entities expose persistence methods, and Data Mapper, where repositories handle persistence.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Why did TypeORM stop loading an eager relation?",
      "display": "Eager relations work with find methods; QueryBuilder requires explicit leftJoinAndSelect.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: Which manager belongs inside a TypeORM transaction?",
      "display": "All operations must use the transactional entity manager passed to that transaction.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "FAQ: Why can Sequelize load an association in only one direction?",
      "display": "Only the association source knows about it; define the reverse association to include the source from its target.",
      "asOf": "2026-11-17"
    },
    "F128": {
      "label": "FAQ: Do Sequelize models get all their TypeScript types automatically?",
      "display": "Sequelize supplies TypeScript definitions, but models still need manual type declarations.",
      "asOf": "2026-11-17"
    },
    "F129": {
      "label": "FAQ: What happens when MikroORM flushes managed entities?",
      "display": "It compares loaded objects with their tracked state and writes changed fields.",
      "asOf": "2026-11-17"
    },
    "F130": {
      "label": "FAQ: What happens when MikroORM flushes managed entities?",
      "display": "Computed changes execute inside a transaction when the selected driver supports it.",
      "asOf": "2026-11-17"
    },
    "F131": {
      "label": "FAQ: Can concurrent MikroORM requests share an identity map?",
      "display": "Keep a unique identity map for each request by using a forked entity manager or request context.",
      "asOf": "2026-11-17"
    },
    "F132": {
      "label": "FAQ: Can concurrent MikroORM requests share an identity map?",
      "display": "A collection must be initialized before its checked getItems access.",
      "asOf": "2026-11-17"
    },
    "F133": {
      "label": "Library name, drizzle-orm",
      "display": "Drizzle ORM",
      "asOf": "2026-11-19"
    },
    "F134": {
      "label": "Monthly downloads, drizzle-orm",
      "display": "182.3M",
      "asOf": "2026-11-19"
    },
    "F135": {
      "label": "License, drizzle-orm",
      "display": "Apache-2.0",
      "asOf": "2026-11-19"
    },
    "F136": {
      "label": "Package release, drizzle-orm",
      "display": "0.45.4",
      "asOf": "2026-11-19"
    },
    "F137": {
      "label": "Package release date, drizzle-orm",
      "display": "Oct 2026",
      "asOf": "2026-11-19"
    },
    "F138": {
      "label": "Install, drizzle-orm",
      "display": "npm install drizzle-orm@0.45.4 better-sqlite3",
      "asOf": "2026-11-19"
    },
    "F139": {
      "label": "Quickstart, drizzle-orm",
      "display": "import { drizzle } from \"drizzle-orm/better-sqlite3\";\nconst db = drizzle(\":memory:\");\nconsole.log(db.all(\"select 1 as value\"));\ndb.$client.close();\n",
      "asOf": "2026-11-19"
    },
    "F140": {
      "label": "Official description, drizzle-orm",
      "display": "ORM",
      "asOf": "2026-11-19"
    },
    "F141": {
      "label": "Quickstart source file, drizzle-orm",
      "display": "docs/get-started-sqlite",
      "asOf": "2026-11-19"
    },
    "F142": {
      "label": "Repository stars, drizzle-orm",
      "display": "36.3K",
      "asOf": "2026-11-19"
    },
    "F143": {
      "label": "SQL model mapping, drizzle-orm",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F144": {
      "label": "MongoDB model mapping, drizzle-orm",
      "display": "No",
      "asOf": "2026-11-19"
    },
    "F145": {
      "label": "Model and update workflow, drizzle-orm",
      "display": "Relational TypeScript schemas with SQL-shaped queries and a separate optional toolchain for schema operations. Core/runtime counts are not added to drizzle-kit downloads.",
      "asOf": "2026-11-19"
    },
    "F146": {
      "label": "First-call database prerequisites, drizzle-orm",
      "display": "Supported Node.js ESM host with better-sqlite3 and its native binary available. Uses an ephemeral in-memory SQLite connection and literal select1; no preexisting table, migrations, credentials, or remote service. Selected0.45.4 declaration signatures confirm the overload and string SQL query; current unversioned setup advertises RC installs, which are explicitly replaced by the audited stable selected version.",
      "asOf": "2026-11-19"
    },
    "F147": {
      "label": "Project function, drizzle-orm",
      "display": "async count({ model, modelKey = model, where }) {\n\t\t\t\t\tconst table = getSchema(model);\n\t\t\t\t\tconst clause = where\n\t\t\t\t\t\t? convertWhereClause(where, model, modelKey)\n\t\t\t\t\t\t: [];\n\t\t\t\t\tconst res = await db\n\t\t\t\t\t\t.select({ count: count() })\n\t\t\t\t\t\t.from(table)\n\t\t\t\t\t\t.where(...clause);\n\t\t\t\t\treturn res[0].count;\n\t\t\t\t}\n",
      "asOf": "2026-11-19"
    },
    "F148": {
      "label": "Project source file, drizzle-orm",
      "display": "packages/drizzle-adapter/src/drizzle-adapter.ts",
      "asOf": "2026-11-19"
    },
    "F149": {
      "label": "Project full_name, drizzle-orm",
      "display": "better-auth/better-auth",
      "asOf": "2026-11-19"
    },
    "F150": {
      "label": "Project stargazers_count, drizzle-orm",
      "display": "30.8K",
      "asOf": "2026-11-19"
    },
    "F151": {
      "label": "Library name, @prisma/client",
      "display": "Prisma Client",
      "asOf": "2026-11-19"
    },
    "F152": {
      "label": "Monthly downloads, @prisma/client",
      "display": "95.8M",
      "asOf": "2026-11-19"
    },
    "F153": {
      "label": "License, @prisma/client",
      "display": "Apache-2.0",
      "asOf": "2026-11-19"
    },
    "F154": {
      "label": "Package release, @prisma/client",
      "display": "7.10.1",
      "asOf": "2026-11-19"
    },
    "F155": {
      "label": "Package release date, @prisma/client",
      "display": "Oct 2026",
      "asOf": "2026-11-19"
    },
    "F156": {
      "label": "Install, @prisma/client",
      "display": "npm install @prisma/client@7.10.1 @prisma/adapter-better-sqlite3@7.10.1 prisma@7.10.1 typescript tsx @types/node",
      "asOf": "2026-11-19"
    },
    "F157": {
      "label": "Quickstart, @prisma/client",
      "display": "npm pkg set type=module\nmkdir -p prisma\ncat > prisma/schema.prisma <<'SCHEMA'\ngenerator client {\n  provider = \"prisma-client\"\n  output = \"../generated/prisma\"\n}\ndatasource db {\n  provider = \"sqlite\"\n}\nmodel User {\n  id Int @id @default(autoincrement())\n  name String\n}\nSCHEMA\ncat > prisma7.config.ts <<'CONFIG'\nimport { defineConfig } from \"prisma/config\";\nimport { resolve } from \"node:path\";\nexport default defineConfig({ schema: \"prisma/schema.prisma\", datasource: { url: \"file:\" + resolve(\"orm-demo.db\") } });\nCONFIG\nnpx prisma migrate dev --name init\nnpx prisma generate\ncat > app.ts <<'APP'\nimport { PrismaClient } from \"./generated/prisma/client\";\nimport { PrismaBetterSqlite3 } from \"@prisma/adapter-better-sqlite3\";\nimport { resolve } from \"node:path\";\nconst prisma = new PrismaClient({ adapter: new PrismaBetterSqlite3({ url: \"file:\" + resolve(\"orm-demo.db\") }) });\nconsole.log(await prisma.user.create({ data: { name: \"Ada\" } }));\nawait prisma.$disconnect();\nAPP\nnpx tsx app.ts\n",
      "asOf": "2026-11-19"
    },
    "F158": {
      "label": "Repository stars, @prisma/client",
      "display": "47.7K",
      "asOf": "2026-11-19"
    },
    "F159": {
      "label": "SQL model mapping, @prisma/client",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F160": {
      "label": "MongoDB model mapping, @prisma/client",
      "display": "No",
      "asOf": "2026-11-19"
    },
    "F161": {
      "label": "Model and update workflow, @prisma/client",
      "display": "Schema-generated client with typed per-model operations; CLI generation plus a compatible driver adapter is required in this7 generation. Current7 MongoDB support is pending despite broad package metadata still naming MongoDB.",
      "asOf": "2026-11-19"
    },
    "F162": {
      "label": "First-call database prerequisites, @prisma/client",
      "display": "New writable empty Node.js project, npm initialization/package.json already present, supported Prisma7 Node/TypeScript host, SQLite native adapter requirements, and CLI7.10.1 installed. This is a disclosed shell setup recipe whose commands a user would run, not a claim that they were executed. It writes its own schema/config/app, creates/migrates the demo DB, generates the exact schema client, and makes one basic create; config and adapter use the same absolute file URL. The longer setup is intrinsic to generated models, not logging/demo boilerplate. Use only in a fresh demo directory.",
      "asOf": "2026-11-19"
    },
    "F163": {
      "label": "Project function, @prisma/client",
      "display": "async function changeSMSLockState(identifier: string, status: SMSLockState) {\n  let userId: number | undefined, teamId: number | undefined;\n\n  if (identifier.startsWith(\"sms:user:\")) {\n    userId = Number(identifier.slice(9));\n  } else if (identifier.startsWith(\"sms:team:\")) {\n    teamId = Number(identifier.slice(9));\n  }\n\n  if (userId) {\n    const user = await prisma.user.findUnique({ where: { id: userId, profiles: { none: {} } } });\n    if (user?.smsLockReviewedByAdmin) return;\n\n    await prisma.user.update({\n      where: {\n        id: userId,\n        profiles: { none: {} },\n      },\n      data: {\n        smsLockState: status,\n      },\n    });\n  } else {\n    const team = await prisma.team.findUnique({\n      where: { id: teamId, parentId: null, isOrganization: false },\n    });\n    if (team?.smsLockReviewedByAdmin) return;\n\n    await prisma.team.update({\n      where: {\n        id: teamId,\n        parentId: null,\n        isOrganization: false,\n      },\n      data: {\n        smsLockState: status,\n      },\n    });\n  }\n}\n",
      "asOf": "2026-11-19"
    },
    "F164": {
      "label": "Project source file, @prisma/client",
      "display": "packages/lib/smsLockState.ts",
      "asOf": "2026-11-19"
    },
    "F165": {
      "label": "Project full_name, @prisma/client",
      "display": "calcom/cal.diy",
      "asOf": "2026-11-19"
    },
    "F166": {
      "label": "Project stargazers_count, @prisma/client",
      "display": "50.1K",
      "asOf": "2026-11-19"
    },
    "F167": {
      "label": "Library name, mongoose",
      "display": "Mongoose",
      "asOf": "2026-11-19"
    },
    "F168": {
      "label": "Monthly downloads, mongoose",
      "display": "35.2M",
      "asOf": "2026-11-19"
    },
    "F169": {
      "label": "License, mongoose",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F170": {
      "label": "Package release, mongoose",
      "display": "9.12.2",
      "asOf": "2026-11-19"
    },
    "F171": {
      "label": "Package release date, mongoose",
      "display": "Nov 2026",
      "asOf": "2026-11-19"
    },
    "F172": {
      "label": "Install, mongoose",
      "display": "npm install mongoose@9.12.2",
      "asOf": "2026-11-19"
    },
    "F173": {
      "label": "Quickstart, mongoose",
      "display": "const mongoose = require(\"mongoose\");\nasync function main() {\n  await mongoose.connect(\"mongodb://127.0.0.1:27017/orm_demo\");\n  const Kitten = mongoose.model(\"Kitten\", new mongoose.Schema({ name: String }));\n  console.log(await Kitten.findOne({ name: \"Silence\" }));\n  await mongoose.disconnect();\n}\nmain().catch(console.error);\n",
      "asOf": "2026-11-19"
    },
    "F174": {
      "label": "Official description, mongoose",
      "display": "MongoDB object modeling designed to work in an asynchronous environment.",
      "asOf": "2026-11-19"
    },
    "F175": {
      "label": "Quickstart source file, mongoose",
      "display": "getting-started.js",
      "asOf": "2026-11-19"
    },
    "F176": {
      "label": "Repository stars, mongoose",
      "display": "27.4K",
      "asOf": "2026-11-19"
    },
    "F177": {
      "label": "SQL model mapping, mongoose",
      "display": "No",
      "asOf": "2026-11-19"
    },
    "F178": {
      "label": "MongoDB model mapping, mongoose",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F179": {
      "label": "Model and update workflow, mongoose",
      "display": "MongoDB-specific document schemas, models, validation, and query/document APIs. It is deliberately an ODM alongside the SQL-oriented models in this broad original model-mapping category.",
      "asOf": "2026-11-19"
    },
    "F180": {
      "label": "First-call database prerequisites, mongoose",
      "display": "Supported Node.js CommonJS host plus an already running local MongoDB service on127.0.0.1:27017, with an accessible orm_demo database. This first read can return null; it does not pretend toy data already exists or start/install MongoDB. Set the real connection/authentication URL when the user runs it.",
      "asOf": "2026-11-19"
    },
    "F181": {
      "label": "Project function, mongoose",
      "display": "async findOneAndDelete(query: FilterQuery<T_DBModel> & T_Enforcement): Promise<T_MappedEntity | null> {\n    const data = await this.MongooseModel.findOneAndDelete(query).lean();\n    if (!data) return null;\n\n    return this.mapEntity(data);\n  }\n",
      "asOf": "2026-11-19"
    },
    "F182": {
      "label": "Project source file, mongoose",
      "display": "libs/dal/src/repositories/base-repository.ts",
      "asOf": "2026-11-19"
    },
    "F183": {
      "label": "Project full_name, mongoose",
      "display": "novuhq/novu",
      "asOf": "2026-11-19"
    },
    "F184": {
      "label": "Project stargazers_count, mongoose",
      "display": "40.4K",
      "asOf": "2026-11-19"
    },
    "F185": {
      "label": "Library name, typeorm",
      "display": "TypeORM",
      "asOf": "2026-11-19"
    },
    "F186": {
      "label": "Monthly downloads, typeorm",
      "display": "26.9M",
      "asOf": "2026-11-19"
    },
    "F187": {
      "label": "License, typeorm",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F188": {
      "label": "Package release, typeorm",
      "display": "1.1.3",
      "asOf": "2026-11-19"
    },
    "F189": {
      "label": "Package release date, typeorm",
      "display": "Nov 2026",
      "asOf": "2026-11-19"
    },
    "F190": {
      "label": "Install, typeorm",
      "display": "npm install typeorm@1.1.3 sqlite3",
      "asOf": "2026-11-19"
    },
    "F191": {
      "label": "Quickstart, typeorm",
      "display": "import { DataSource, EntitySchema } from \"typeorm\";\nconst User = new EntitySchema({ name: \"User\", columns: { id: { type: Number, primary: true, generated: true }, name: { type: String } } });\nconst db = new DataSource({ type: \"sqlite\", database: \":memory:\", entities: [User], synchronize: true });\nawait db.initialize();\nconsole.log(await db.getRepository(User).save({ name: \"Ada\" }));\nawait db.destroy();\n",
      "asOf": "2026-11-19"
    },
    "F192": {
      "label": "Repository stars, typeorm",
      "display": "36.7K",
      "asOf": "2026-11-19"
    },
    "F193": {
      "label": "SQL model mapping, typeorm",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F194": {
      "label": "MongoDB model mapping, typeorm",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F195": {
      "label": "Model and update workflow, typeorm",
      "display": "Entity classes or EntitySchema with DataSource/repositories, SQL drivers, and basic native MongoDB support. MongoDB functionality is explicitly a subset of its RDBMS-oriented feature set.",
      "asOf": "2026-11-19"
    },
    "F196": {
      "label": "First-call database prerequisites, typeorm",
      "display": "Supported Node.js ESM host with sqlite3 native peer available. synchronize:true is limited to this new disposable in-memory demo database, not a production schema-migration strategy. The complete entity definition is inline; initialization creates its demo table before the first save.",
      "asOf": "2026-11-19"
    },
    "F197": {
      "label": "Project function, typeorm",
      "display": "export async function seedDatabase() {\n  const recipeRepository = dataSource.getRepository(Recipe);\n  const ratingRepository = dataSource.getRepository(Rating);\n  const userRepository = dataSource.getRepository(User);\n\n  const defaultUser = userRepository.create({\n    email: \"admin@github.com\",\n    nickname: \"administrator\",\n    password: \"s3cr3tp4ssw0rd\",\n  });\n  await userRepository.save(defaultUser);\n\n  const recipes = recipeRepository.create([\n    {\n      title: \"Recipe 1\",\n      description: \"Desc 1\",\n      author: defaultUser,\n      ratings: ratingRepository.create([\n        { value: 2, user: defaultUser },\n        { value: 4, user: defaultUser },\n        { value: 5, user: defaultUser },\n        { value: 3, user: defaultUser },\n        { value: 4, user: defaultUser },\n      ]),\n    },\n    {\n      title: \"Recipe 2\",\n      author: defaultUser,\n      ratings: ratingRepository.create([\n        { value: 2, user: defaultUser },\n        { value: 4, user: defaultUser },\n      ]),\n    },\n  ]);\n  await recipeRepository.save(recipes);\n\n  return {\n    defaultUser,\n  };\n}\n",
      "asOf": "2026-11-19"
    },
    "F198": {
      "label": "Project source file, typeorm",
      "display": "examples/typeorm-basic-usage/helpers.ts",
      "asOf": "2026-11-19"
    },
    "F199": {
      "label": "Project full_name, typeorm",
      "display": "MichalLytek/type-graphql",
      "asOf": "2026-11-19"
    },
    "F200": {
      "label": "Project stargazers_count, typeorm",
      "display": "8.1K",
      "asOf": "2026-11-19"
    },
    "F201": {
      "label": "Library name, sequelize",
      "display": "Sequelize",
      "asOf": "2026-11-19"
    },
    "F202": {
      "label": "Monthly downloads, sequelize",
      "display": "15.8M",
      "asOf": "2026-11-19"
    },
    "F203": {
      "label": "License, sequelize",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F204": {
      "label": "Package release, sequelize",
      "display": "6.37.8",
      "asOf": "2026-11-19"
    },
    "F205": {
      "label": "Package release date, sequelize",
      "display": "Mar 2026",
      "asOf": "2026-11-19"
    },
    "F206": {
      "label": "Install, sequelize",
      "display": "npm install sequelize@6.37.8 sqlite3",
      "asOf": "2026-11-19"
    },
    "F207": {
      "label": "Quickstart, sequelize",
      "display": "const { Sequelize, DataTypes } = require(\"sequelize\");\nasync function main() {\n  const db = new Sequelize(\"sqlite::memory:\", { logging: false });\n  const User = db.define(\"User\", { name: DataTypes.STRING });\n  await db.sync();\n  console.log((await User.create({ name: \"Ada\" })).toJSON());\n  await db.close();\n}\nmain().catch(console.error);\n",
      "asOf": "2026-11-19"
    },
    "F208": {
      "label": "Repository stars, sequelize",
      "display": "30.3K",
      "asOf": "2026-11-19"
    },
    "F209": {
      "label": "SQL model mapping, sequelize",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F210": {
      "label": "MongoDB model mapping, sequelize",
      "display": "No",
      "asOf": "2026-11-19"
    },
    "F211": {
      "label": "Model and update workflow, sequelize",
      "display": "Stable6 SQL model classes/define API with instance change tracking, associations, and transactions; migration orchestration uses a separate CLI/Umzug workflow. Current7 alpha is not silently substituted for6.",
      "asOf": "2026-11-19"
    },
    "F212": {
      "label": "First-call database prerequisites, sequelize",
      "display": "Supported Node.js CommonJS host with sqlite3 installed. The demo defines and synchronizes only a new in-memory SQLite database before one create. sync is development setup here, not a substitute for versioned production migrations; logging is disabled rather than copied as boilerplate.",
      "asOf": "2026-11-19"
    },
    "F213": {
      "label": "Project function, sequelize",
      "display": "async function updatePasswordHashHook (user, options) {\n    // suggested way to hash passwords to be able to do this asynchronously:\n    // @see https://github.com/sequelize/sequelize/issues/1821#issuecomment-44265819\n\n    if (!user.changed('password')) {\n      return Promise.resolve()\n    }\n\n    return Scrypt.kdf(user.getDataValue('password'), { logN: 15 }).then(keyBuf => {\n      user.setDataValue('password', Buffer.from(keyBuf).toString('hex'))\n    })\n  }\n",
      "asOf": "2026-11-19"
    },
    "F214": {
      "label": "Project source file, sequelize",
      "display": "lib/models/user.js",
      "asOf": "2026-11-19"
    },
    "F215": {
      "label": "Project full_name, sequelize",
      "display": "hedgedoc/hedgedoc",
      "asOf": "2026-11-19"
    },
    "F216": {
      "label": "Project stargazers_count, sequelize",
      "display": "7.5K",
      "asOf": "2026-11-19"
    },
    "F217": {
      "label": "Library name, @mikro-orm/core",
      "display": "MikroORM",
      "asOf": "2026-11-19"
    },
    "F218": {
      "label": "Monthly downloads, @mikro-orm/core",
      "display": "5.8M",
      "asOf": "2026-11-19"
    },
    "F219": {
      "label": "License, @mikro-orm/core",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F220": {
      "label": "Package release, @mikro-orm/core",
      "display": "7.2.10",
      "asOf": "2026-11-19"
    },
    "F221": {
      "label": "Package release date, @mikro-orm/core",
      "display": "Nov 2026",
      "asOf": "2026-11-19"
    },
    "F222": {
      "label": "Install, @mikro-orm/core",
      "display": "npm install @mikro-orm/core@7.2.10 @mikro-orm/sqlite@7.2.10",
      "asOf": "2026-11-19"
    },
    "F223": {
      "label": "Quickstart, @mikro-orm/core",
      "display": "import { defineEntity, p } from \"@mikro-orm/core\";\nimport { MikroORM } from \"@mikro-orm/sqlite\";\nconst User = defineEntity({ name: \"User\", properties: { id: p.integer().primary(), name: p.string() } });\nconst orm = await MikroORM.init({ entities: [User], dbName: \":memory:\" });\nawait orm.schema.create();\nconst em = orm.em.fork();\nconst user = em.create(User, { name: \"Ada\" });\nem.persist(user);\nawait em.flush();\nconsole.log(user);\nawait orm.close(true);\n",
      "asOf": "2026-11-19"
    },
    "F224": {
      "label": "Repository stars, @mikro-orm/core",
      "display": "9.3K",
      "asOf": "2026-11-19"
    },
    "F225": {
      "label": "SQL model mapping, @mikro-orm/core",
      "display": "Via plugin",
      "asOf": "2026-11-19"
    },
    "F226": {
      "label": "MongoDB model mapping, @mikro-orm/core",
      "display": "Via plugin",
      "asOf": "2026-11-19"
    },
    "F227": {
      "label": "Model and update workflow, @mikro-orm/core",
      "display": "Data Mapper with Unit of Work and Identity Map; changes on managed objects are synchronized by flush. Database-driver packages and optional migration extension are explicit peers, not pooled downloads.",
      "asOf": "2026-11-19"
    },
    "F228": {
      "label": "First-call database prerequisites, @mikro-orm/core",
      "display": "Supported ESM Node.js host with matching @mikro-orm/sqlite7.2.10 and its SQLite runtime prerequisites. Every entity/property is inline and schema.create creates only the disposable in-memory database before persist/flush. Uses current7 schema.create(), not an assumed old createSchema() API; a forked EntityManager avoids global-context use.",
      "asOf": "2026-11-19"
    },
    "F229": {
      "label": "Project function, @mikro-orm/core",
      "display": "async update(id: number, dto: UpdateUserDto) {\n    const user = await this.userRepository.findOneOrFail(id);\n    this.em.assign(user, dto);\n    await this.em.flush();\n\n    return this.buildUserRO(user);\n  }\n",
      "asOf": "2026-11-19"
    },
    "F230": {
      "label": "Project source file, @mikro-orm/core",
      "display": "src/user/user.service.ts",
      "asOf": "2026-11-19"
    },
    "F231": {
      "label": "Project full_name, @mikro-orm/core",
      "display": "mikro-orm/nestjs-realworld-example-app",
      "asOf": "2026-11-19"
    },
    "F232": {
      "label": "Project stargazers_count, @mikro-orm/core",
      "display": "344",
      "asOf": "2026-11-19"
    },
    "F233": {
      "label": "Library name, objection",
      "display": "Objection.js",
      "asOf": "2026-11-19"
    },
    "F234": {
      "label": "Monthly downloads, objection",
      "display": "1.2M",
      "asOf": "2026-11-19"
    },
    "F235": {
      "label": "License, objection",
      "display": "MIT",
      "asOf": "2026-11-19"
    },
    "F236": {
      "label": "Package release, objection",
      "display": "4.4.3",
      "asOf": "2026-11-19"
    },
    "F237": {
      "label": "Package release date, objection",
      "display": "Nov 2026",
      "asOf": "2026-11-19"
    },
    "F238": {
      "label": "Install, objection",
      "display": "npm install objection@4.4.3 knex sqlite3",
      "asOf": "2026-11-19"
    },
    "F239": {
      "label": "Quickstart, objection",
      "display": "import { Model } from \"objection\";\nimport Knex from \"knex\";\nconst knex = Knex({ client: \"sqlite3\", connection: { filename: \":memory:\" }, useNullAsDefault: true });\nModel.knex(knex);\nclass Person extends Model { static get tableName() { return \"persons\"; } }\nawait knex.schema.createTable(\"persons\", table => { table.increments(\"id\"); table.string(\"firstName\"); });\nconsole.log(await Person.query().insert({ firstName: \"Ada\" }));\nawait knex.destroy();\n",
      "asOf": "2026-11-19"
    },
    "F240": {
      "label": "Official description, objection",
      "display": "An SQL-friendly ORM for Node.js",
      "asOf": "2026-11-19"
    },
    "F241": {
      "label": "Quickstart source file, objection",
      "display": "example.mjs",
      "asOf": "2026-11-19"
    },
    "F242": {
      "label": "Repository stars, objection",
      "display": "17",
      "asOf": "2026-11-19"
    },
    "F243": {
      "label": "SQL model mapping, objection",
      "display": "Yes",
      "asOf": "2026-11-19"
    },
    "F244": {
      "label": "MongoDB model mapping, objection",
      "display": "No",
      "asOf": "2026-11-19"
    },
    "F245": {
      "label": "Model and update workflow, objection",
      "display": "SQL-oriented model/query builder built on Knex, with relation graphs and plugin relation inspection. Native automatic schema creation/migration from models is intentionally omitted in favor of Knex migrations; current4.x continues in ditojs/objection.",
      "asOf": "2026-11-19"
    },
    "F246": {
      "label": "First-call database prerequisites, objection",
      "display": "Supported Node.js ESM host with Knex and sqlite3 available. Model-to-table binding, table creation, one insert, and connection cleanup are all explicit in a new in-memory SQLite database. Schema DDL belongs to the Knex peer, and Model.query/insert belong to Objection. Current4.x publisher README confirms the package continues at ditojs/objection.",
      "asOf": "2026-11-19"
    },
    "F247": {
      "label": "Project function, objection",
      "display": "_buildEagerSegment(astNode, modelClass, astRoot) {\n    const filters = {};\n    const relations = modelClass.getRelations();\n    let expression = '';\n\n    for (let i = 0, l = astNode.selectionSet.selections.length; i < l; i += 1) {\n      const selectionNode = astNode.selectionSet.selections[i];\n      const relation = relations[selectionNode.name.value];\n\n      if (relation) {\n        expression = this._buildEagerRelationSegment(selectionNode, relation, expression, filters, astRoot);\n      } else if (selectionNode.kind === KIND_FRAGMENT_SPREAD) {\n        expression = this._buildEagerFragmentSegment(selectionNode, modelClass, expression, filters, astRoot);\n      }\n    }\n\n    return {\n      expression,\n      filters,\n    };\n  }\n",
      "asOf": "2026-11-19"
    },
    "F248": {
      "label": "Project source file, objection",
      "display": "lib/SchemaBuilder.js",
      "asOf": "2026-11-19"
    },
    "F249": {
      "label": "Project full_name, objection",
      "display": "Vincit/objection-graphql",
      "asOf": "2026-11-19"
    },
    "F250": {
      "label": "Project stargazers_count, objection",
      "display": "302",
      "asOf": "2026-11-19"
    },
    "F251": {
      "label": "Developer need, drizzle",
      "display": "Schema and queries in TypeScript",
      "asOf": "2026-11-17"
    },
    "F252": {
      "label": "Pick reason, drizzle",
      "display": "declares tables in TypeScript and writes SQL-like queries",
      "asOf": "2026-11-17"
    },
    "F253": {
      "label": "Developer need, mongoose",
      "display": "MongoDB documents",
      "asOf": "2026-11-17"
    },
    "F254": {
      "label": "Pick reason, mongoose",
      "display": "models MongoDB documents with schemas",
      "asOf": "2026-11-17"
    },
    "F255": {
      "label": "Developer need, objection",
      "display": "SQL-first queries on knex",
      "asOf": "2026-11-17"
    },
    "F256": {
      "label": "Pick reason, objection",
      "display": "adds models and relations to the knex query builder",
      "asOf": "2026-11-17"
    },
    "F257": {
      "label": "Strength lead, drizzle",
      "display": "Relational and SQL-like queries",
      "asOf": "2026-11-17"
    },
    "F258": {
      "label": "Strength body, drizzle",
      "display": "Writes joins with select and from, or reads nested records with db.query.",
      "asOf": "2026-11-17"
    },
    "F259": {
      "label": "Strength lead, drizzle",
      "display": "Runs in many runtimes",
      "asOf": "2026-11-17"
    },
    "F260": {
      "label": "Strength body, drizzle",
      "display": "Works in Node.js, Bun, Deno, Cloudflare Workers, and browsers, with no dependencies.",
      "asOf": "2026-11-17"
    },
    "F261": {
      "label": "Limit lead, drizzle",
      "display": "No MongoDB support",
      "asOf": "2026-11-17"
    },
    "F262": {
      "label": "Limit body, drizzle",
      "display": "Supports PostgreSQL, MySQL, and SQLite databases, including serverless ones such as Neon and Turso.",
      "asOf": "2026-11-17"
    },
    "F263": {
      "label": "Strength lead, mongoose",
      "display": "Schemas compiled into models",
      "asOf": "2026-11-17"
    },
    "F264": {
      "label": "Strength body, mongoose",
      "display": "Defines document fields with mongoose.Schema, then compiles the schema into a model for queries.",
      "asOf": "2026-11-17"
    },
    "F265": {
      "label": "Limit lead, mongoose",
      "display": "MongoDB only",
      "asOf": "2026-11-17"
    },
    "F266": {
      "label": "Limit body, mongoose",
      "display": "Models MongoDB documents. SQL databases need one of the other libraries here.",
      "asOf": "2026-11-17"
    },
    "F267": {
      "label": "Strength lead, objection",
      "display": "Built on knex",
      "asOf": "2026-11-17"
    },
    "F268": {
      "label": "Strength body, objection",
      "display": "Connects to every database knex supports, with SQLite, Postgres, and MySQL tested.",
      "asOf": "2026-11-17"
    },
    "F269": {
      "label": "Limit lead, objection",
      "display": "No migrations from models",
      "asOf": "2026-11-17"
    },
    "F270": {
      "label": "Limit body, objection",
      "display": "Schema changes go through knex migrations, not model definitions.",
      "asOf": "2026-11-17"
    }
  },
  "dataCheckedAt": "2026-11-19",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best JavaScript ORM libraries Prisma TypeORM Sequelize MikroORM code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
