datapod_postgres 0.2.0 copy "datapod_postgres: ^0.2.0" to clipboard
datapod_postgres: ^0.2.0 copied to clipboard

PostgreSQL plugin for Datapod ORM.

datapod_postgres #

The PostgreSQL database plugin for the Datapod ORM.

✨ Features #

  • Fully integrates PostgreSQL into the Datapod ecosystem.
  • Supports transactions, connection pooling, and automated schema management.
  • Handles advanced data types like JSONB and Arrays via Datapod's mapping system.

📖 Usage #

Add to your pubspec.yaml:

dependencies:
  datapod_postgres: any
databases:
  - name: main_db
    plugin: datapod_postgres

In your connections.yaml, provide the credentials (supports environment variables):

connections:
  - name: main_db
    host: ${DB_HOST:-localhost}
    port: 5432
    username: my_user
    password: ${DB_PASSWORD}
    database: my_app

  # Optional: Separate connection for migrations (e.g. admin user)
  - name: migration_db
    host: localhost
    port: 5432
    username: admin_user
    password: admin_password
    database: my_app

Then link it in databases.yaml:

databases:
  - name: main_db
    plugin: datapod_postgres
    connection: main_db
    migrationConnection: migration_db # Optional

For full documentation, see the root README.

0
likes
140
points
60
downloads

Publisher

unverified uploader

Weekly Downloads

PostgreSQL plugin for Datapod ORM.

Repository (GitHub)
View/report issues

Topics

#orm #database #postgresql

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

datapod_api, datapod_engine, logging, postgres

More

Packages that depend on datapod_postgres