{"id":15540092,"url":"https://github.com/hden/rethinkdb-pool","last_synced_at":"2025-08-20T22:30:48.432Z","repository":{"id":13671909,"uuid":"16365583","full_name":"hden/rethinkdb-pool","owner":"hden","description":"Connection-pool for RethinkDB","archived":false,"fork":false,"pushed_at":"2024-10-29T19:56:17.000Z","size":59,"stargazers_count":22,"open_issues_count":6,"forks_count":7,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-29T21:46:34.151Z","etag":null,"topics":["connection-pool","rethinkdb"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hden.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-01-30T01:42:01.000Z","updated_at":"2024-07-09T09:44:38.000Z","dependencies_parsed_at":"2024-01-17T00:55:08.299Z","dependency_job_id":"bb310ffe-a5bd-4097-a2d3-445499bcddd2","html_url":"https://github.com/hden/rethinkdb-pool","commit_stats":{"total_commits":62,"total_committers":6,"mean_commits":"10.333333333333334","dds":"0.19354838709677424","last_synced_commit":"c76e442cf39156645527b7351ab32a5a93f0ce80"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hden%2Frethinkdb-pool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hden%2Frethinkdb-pool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hden%2Frethinkdb-pool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hden%2Frethinkdb-pool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hden","download_url":"https://codeload.github.com/hden/rethinkdb-pool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230462906,"owners_count":18229864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["connection-pool","rethinkdb"],"created_at":"2024-10-02T12:12:36.411Z","updated_at":"2024-12-19T16:10:34.984Z","avatar_url":"https://github.com/hden.png","language":"JavaScript","readme":"rethinkdb-pool\n==============\n\n[![Build Status](https://travis-ci.org/hden/rethinkdb-pool.svg?branch=master)](https://travis-ci.org/hden/rethinkdb-pool)\n[![NPM version](https://badge.fury.io/js/rethinkdb-pool.svg)](http://badge.fury.io/js/rethinkdb-pool)\n[![dependencies Status](https://david-dm.org/hden/rethinkdb-pool/status.svg)](https://david-dm.org/hden/rethinkdb-pool)\n\nConnection-pool for RethinkDB\n\n[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\nInstallation\n-----------\n\n    npm install --save rethinkdb-pool\n\nUsage\n-----\n\n## Create pool\n\n```js\nvar r = require('rethinkdb')\nvar createPool = require('rethinkdb-pool')\nvar pool = createPool(r, {\n  host:'localhost',\n  port:28015,\n  db:'marvel',\n  authKey:'hunter2'\n})\n```\n\n## Run\n\n```js\nvar query = r.table('foo').limit(100)\n\n// callback\npool.run(query, function (error, list) {\n  // no more acquire, no more toArray, yay!!\n})\n\n// promise\npool.run(query).then(function (list) {\n  // promise, yay\n})\n```\n\n## Acquire / release resources\n\nConnection can be acquired by calling the `.acquire()` function, but the responsibility of managing resources can be quite challenging.\n\nSee: http://bluebirdjs.com/docs/api/resource-management.html\n\n```js\n// Don't do this! Leaks resources!\npool.acquire().then(function (connection) {\n  r.table('aTable').limit(10).run(connection, function (error, cursor) {\n    if (error != null) {\n      return handleError(error)\n    }\n    cursor.toArray(function (error, data) {\n      if (error != null) {\n        return handleError(error)\n      }\n      console.log(data)\n      pool.release(connection)\n    })\n  })\n})\n```\n","funding_links":[],"categories":["Awesome RethinkDB [![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)"],"sub_categories":["Table of Contents"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhden%2Frethinkdb-pool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhden%2Frethinkdb-pool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhden%2Frethinkdb-pool/lists"}