Skip to content

Dart PostgreSQL driver: supports extended query format, binary protocol and statement reuse.

License

Notifications You must be signed in to change notification settings

wrike/postgresql-dart

This branch is 60 commits behind stablekernel/postgresql-dart:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0a195ac · Jul 19, 2017

History

51 Commits
Jan 19, 2017
Jul 19, 2017
Jul 19, 2017
Sep 1, 2016
Sep 1, 2016
Mar 15, 2017
Jul 5, 2017
Sep 30, 2016
Dec 10, 2016
Jul 2, 2017

Repository files navigation

postgres

Build Status codecov

A library for connecting to and querying PostgreSQL databases.

This driver uses the more efficient and secure extended query format of the PostgreSQL protocol.

Usage

Create PostgreSQLConnections and open them:

var connection = new PostgreSQLConnection("localhost", 5432, "dart_test", username: "dart", password: "dart");
await connection.open();

Execute queries with query:

var results = await connection.query("SELECT a, b FROM table WHERE a = @aValue", substitutionValues: {
    "aValue" : 3
});

Execute queries in a transaction:

await connection.transaction((ctx) async {
    var result = await ctx.query("SELECT id FROM table");
    await ctx.query("INSERT INTO table (id) VALUES (@a:int4)", {
        "a" : result.last[0] + 1
    });
});

See the API documentation: https://www.dartdocs.org/documentation/postgres/latest.

Features and bugs

Please file feature requests and bugs at the issue tracker.

About

Dart PostgreSQL driver: supports extended query format, binary protocol and statement reuse.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 99.8%
  • Shell 0.2%