postgres 0.9.1 copy "postgres: ^0.9.1" to clipboard
postgres: ^0.9.1 copied to clipboard

outdatedDart 1 only

A library to connect and query PostgreSQL databases.

postgres #

Build Status

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.

290
likes
0
pub points
96%
popularity

Publisher

unverified uploader

A library to connect and query PostgreSQL databases.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

crypto

More

Packages that depend on postgres