Skip to main content

image

PONDER

An Object Relational Mapping Tool for Deno Runtime Environment.
Ponder is available for import at: https://deno.land/x/ponder and this is our link to documentation website: https://ponder.deno.dev/

What is Ponder?

  • Ponder is a simple ORM for PostgreSQL built for Deno.
  • Create, read, update, delete tables, add/delete columns, rows, and cells.
  • Writing raw SQL is cumbersome and time consuming for developers. Ponder seeks to address this by providing simple, intuitive methods for manipulating data and tables in your database along Object Oriented Programming principles.

Features

  • Basic CRUD functionality for interacting with your PostGRES Database including managing tables.
  • Introspect database and modify database tables through models in accordance with principles of OOP
  • Introspect your database for an object representation of your tables
  • Create model instances from your database.

Getting Started

Ponder is a third-party module available at deno.land. Simply import/export the dependency for use in your project.

import * as ponder from "https://deno.land/x/ponder/mod.ts";

Using dotenv Module from Deno

It is recommended to use the dotenv module from Deno to protect sensitive information. Import the dotenv module, write your Database URI as a variable in your own .env file, and then you can refer to it using that variable label.

#.env
PG_URI=YourDatabaseURI

#app
import "https://deno.land/x/dotenv/load.ts";

const PG_URI = Deno.env.get('PG_URI');  // returns YourDatabaseURI from .env file

Connect your PostgreSQL Database

Connect your existing PostGRES Database using the built-in method called poolConnection. Ponder uses a pool connection which is strongly recommended by PostGRES for use in their databases. Simply insert your database URI (or insert from a dotenv file).

OPTIONAL Arguments: how many pool connections you’d like to have, true or false for Lazy Loading (recommended true).

import{ poolConnection } from'./deps.ts'

const yourVariable = ponder.poolConnection(PG_URI);

Now, using yourVariable you can access and use any of Ponder’s built-in methods.

Documentation

The documentation is available here.
See docs for complete list of methods, their functionality, and how to use them.

Upcoming Features and Developments

Features currently in development include:

  • Ponder CLI coming soon!

Contributing and Issues

We are always looking to improve!
To make contributions, create a fork of the dev branch. Please be sure to utilize the Deno Typescript linter. Ensure that any changes made are reflected in the documentation. Make a pull request to the Dev branch when you have finished making your changes, note that once submitted any changes made will be covered under the MIT liscense.

  • Feel free to contact the maintainers with any questions or concerns.
  • If you come across any bugs or issues while using Ponder feel free to report by simply opening a new issue on our Github.

Built with

Deno Logo PostgreSQL Logo Typescript Logo

Contributors

- Sara Brown : GitHub LinkedIn
- Sam Goldenberg : GitHub LinkedIn
- Matt Connell :GitHub LinkedIn
- Corey McClendon-Brown : GitHub LinkedIn
- Stella Baek : GitHub LinkedIn