Code Monkey home page Code Monkey logo

deno-postgres's Introduction

deno-postgres

ci Gitter chat

PostgreSQL driver for Deno.

It's still work in progress, but you can take it for a test drive!

deno-postgres is being developed based on excellent work of node-postgres and pq.

To Do:

  • connecting to database
  • password handling:
    • cleartext
    • MD5
  • DSN style connection parameters
  • reading connection parameters from environmental variables
  • termination of connection
  • simple queries (no arguments)
  • parsing Postgres data types to native TS types
  • row description
  • parametrized queries
  • connection pooling
  • parsing error response
  • SSL (waiting for Deno to support TLS)
  • tests, tests, tests

Example

import { Client } from "https://deno.land/x/postgres/mod.ts";

async function main() {
  const client = new Client({
    user: "user",
    database: "test",
    hostname: "localhost",
    port: 5432
  });
  await client.connect();
  const result = await client.query("SELECT * FROM people;");
  console.log(result.rows);
  await client.end();
}

main();

Docs

Docs are available at https://deno-postgres.com/

Contributing guidelines

When contributing to repository make sure to:

a) open an issue for what you're working on

b) properly format code using deno fmt

$ deno fmt -- --check

License

There are substantial parts of this library based on other libraries. They have preserved their individual licenses and copyrights.

Eveything is licensed under the MIT License.

All additional work is copyright 2018 - 2019 — Bartłomiej Iwańczuk — All rights reserved.

deno-postgres's People

Contributors

bartlomieju avatar hayd avatar uki00a avatar soremwar avatar andre1sk avatar manyuanrong avatar halvardssm avatar bander-saeed94 avatar kt3k avatar hork71 avatar killbond007 avatar sterlingwes avatar mhvsa avatar michalisgar avatar mariusvb avatar dynajoe avatar kluzzebass avatar jakajancar avatar estebanborai avatar dnsco avatar lenkan avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.