Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/agilord/cockroachdb_pool
CockroachDB connection pool in Dart
https://github.com/agilord/cockroachdb_pool
Last synced: about 3 hours ago
JSON representation
CockroachDB connection pool in Dart
- Host: GitHub
- URL: https://github.com/agilord/cockroachdb_pool
- Owner: agilord
- License: bsd-3-clause
- Created: 2020-02-20T21:27:40.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-14T23:57:36.000Z (about 1 year ago)
- Last Synced: 2024-04-25T23:22:10.598Z (9 months ago)
- Language: Dart
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
A library to control a maximized number of connections to a CockroachDB cluster server.
Features:
- Scans nodes list (via HTTP API) periodically, automatically add/remove nodes.
- On critical errors or elevated timeouts it marks the node as bad and uses other nodes instead.## Discontinued
`package:postgres` from `^3.0.0` supports connection pooling as part of the core
library. Development and advanced pooling support will be migrated to that package.## Usage
Once you've created the `CrdbPool` object, you can:
- Use it as `PostgreSQLExecutionContext` (from `package:postgres`).
- Use it as `PgPool` (from `package:postgres_pool`).
- Use `CrdbPool.run` for non-transactional batches with optional retry.
- Use `CrdbPool.runTx` for transactional batches with optional retry.