An ORM simplifies working with Hydra. It turns tables into objects, queries into code. Less SQL, more logic. ORMs unlock efficient data modeling and transaction management. Hydra is Postgres so all existing ORM integrations with Postgres are compatible. In this guide we will focus on Drizzle ORM, but feel free to connect with your preferred ORM by navigating to their Postgres documentation.Documentation Index
Fetch the complete documentation index at: https://docs.hydra.so/llms.txt
Use this file to discover all available pages before exploring further.
Drizzle ORM
This guide assumes familiarity with:
- Database connection basics with Drizzle
- node-postgres basics
- postgres.js basics
node-postgres and postgres.js drivers.
There are a few differences between the node-postgres and postgres.js drivers that we discovered while using both and integrating them with the Drizzle ORM. For example:
- With
node-postgres, you can installpg-nativeto boost the speed of bothnode-postgresand Drizzle by approximately 10%. node-postgressupports providing type parsers on a per-query basis without globally patching things. For more details, see Types Docs.postgres.jsuses prepared statements by default, which you may need to opt out of.
node-postgres
Step 1 - Install packages
Step 2 - Initialize the driver and make a query
postgres.js
Step 1 - Install packages
Step 2 - Initialize the driver and make a query
What’s Next?
We recommend- following the migration documentation from Object Storage (S3, GCS), Amazon RDS, Heroku, Render, Postgres.
- learning about Hydra, our team and partners behind the project
- scanning the Hydra architecture
