postgres 0.9.1

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 42

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.

Changelog

0.9.1

  • Added transactions: PostgreSQLConnection.transaction and PostgreSQLConnection.cancelTransaction.

0.9.0

  • Initial version

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  postgres: ^0.9.1

2. Install it

You can install packages from the command line:

with pub:


$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:postgres/postgres.dart';
  
Version Uploaded Documentation Archive
1.0.2 Oct 9, 2018 Go to the documentation of postgres 1.0.2 Download postgres 1.0.2 archive
1.0.1 Oct 2, 2018 Go to the documentation of postgres 1.0.1 Download postgres 1.0.1 archive
1.0.0 Aug 6, 2018 Go to the documentation of postgres 1.0.0 Download postgres 1.0.0 archive
0.9.9 Apr 6, 2018 Go to the documentation of postgres 0.9.9 Download postgres 0.9.9 archive
0.9.8 Mar 28, 2018 Go to the documentation of postgres 0.9.8 Download postgres 0.9.8 archive
0.9.7 Mar 19, 2018 Go to the documentation of postgres 0.9.7 Download postgres 0.9.7 archive
0.9.6 Oct 5, 2017 Go to the documentation of postgres 0.9.6 Download postgres 0.9.6 archive
0.9.5 Mar 15, 2017 Go to the documentation of postgres 0.9.5 Download postgres 0.9.5 archive
0.9.4+1 Dec 13, 2016 Go to the documentation of postgres 0.9.4+1 Download postgres 0.9.4+1 archive
0.9.4 Dec 6, 2016 Go to the documentation of postgres 0.9.4 Download postgres 0.9.4 archive

All 15 versions...

Popularity:
Describes how popular the package is relative to other packages. [more]
84
Health:
Code health derived from static analysis. [more]
0
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
0
Overall:
Weighted score of the above. [more]
42
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Support Dart 2 in pubspec.yaml.

The SDK constraint in pubspec.yaml doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.19.0 <2.0.0