conn_pool 2.1.5

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • new64

conn_pool

Manages a pool of connections.

Shared pool

Creating a pool

Pool requires an instance of ConnectionManager to open and close connections. In this article, we will use PostgresManager for demonstration purposes.

final pool = SharedPool(PostgresManager('exampleDB'), minSize: 5, maxSize: 10);

Getting connection

Connection<PostgreSQLConnection> conn = await pool.get();
PostgreSQLConnection db = conn.connection;
await db.execute(
        "CREATE TABLE posts (id SERIAL PRIMARY KEY, name VARCHAR(255), age INT);");

Releasing the connection to the pool

await conn.release();

Change log

2.1.5

  • Minor improvements to SharedPool release

2.1.3

  • Documentation

2.1.2

  • Updated README

2.1.1

  • SharedPool

example/example.dart

import 'package:conn_pool/conn_pool.dart';

main() {}

Use this package as a library

1. Depend on it

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


dependencies:
  conn_pool: "^2.1.5"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


      import 'package:conn_pool/conn_pool.dart';
  
Version Uploaded Documentation Archive
2.1.5 Jul 8, 2018 Go to the documentation of conn_pool 2.1.5 Download conn_pool 2.1.5 archive
2.1.4 Jul 7, 2018 Go to the documentation of conn_pool 2.1.4 Download conn_pool 2.1.4 archive
2.1.1 Jul 7, 2018 Go to the documentation of conn_pool 2.1.1 Download conn_pool 2.1.1 archive

Analysis

We analyzed this package on Jul 13, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

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

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:conn_pool/conn_pool.dart.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.55.0 <2.0.0
Dev dependencies
test ^1.2.0