{"id":27299834,"url":"https://github.com/jandenma/pglink-lite","last_synced_at":"2026-03-16T00:08:03.707Z","repository":{"id":49301088,"uuid":"194534367","full_name":"JandenMa/pglink-lite","owner":"JandenMa","description":"A lite library for Postgresql to use ORM on NodeJS with GraphQL","archived":false,"fork":false,"pushed_at":"2024-01-10T16:52:29.000Z","size":226,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T00:49:37.121Z","etag":null,"topics":["graphql","lite","nodejs","orm","orm-framework","postgres","postgresql"],"latest_commit_sha":null,"homepage":"","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/JandenMa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-06-30T15:54:29.000Z","updated_at":"2023-07-07T13:28:34.000Z","dependencies_parsed_at":"2023-12-20T18:50:50.996Z","dependency_job_id":null,"html_url":"https://github.com/JandenMa/pglink-lite","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JandenMa%2Fpglink-lite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JandenMa%2Fpglink-lite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JandenMa%2Fpglink-lite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JandenMa%2Fpglink-lite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JandenMa","download_url":"https://codeload.github.com/JandenMa/pglink-lite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248501911,"owners_count":21114681,"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":["graphql","lite","nodejs","orm","orm-framework","postgres","postgresql"],"created_at":"2025-04-12T00:49:41.812Z","updated_at":"2026-03-16T00:08:03.671Z","avatar_url":"https://github.com/JandenMa.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pglink-lite\n\n\u003e A library for Postgresql to use ORM on NodeJS with GraphQL\n\u003e\n\u003e Via _Janden Ma_\n\u003e\n\u003e MIT LICENCE\n\n_This library is built for who uses GraphQL on NodeJS, you can use model to operate data._\n\n## Version Change Logs\n\n- **Build20190812 :** Prepared version\n- **Build20190819 :** Beta version\n- **Build20190826 :** Fixed bugs.\n- **Build20190829 :** Added multi insert and update functions.\n- **Build20190917 :**\n  - `MultiUpdateWithConditions` bug fixes.\n  - Supported all update functions in model to set the fields, which need to update to current time automatically, when updated.\n- **Build20190919 :** Supports set global parameter `globalAutoSetTimeFields`\n- **Build20190924 :**\n  - Changed `tableName` and `returnTableName` in `Transaction` to `alias` and `returnWithAlias`\n  - Added `Execute` function in `dataAccess` to run a single query\n  - Bug fixes\n  - Optimized something\n- **Build20191022 :** Update README.\n- **Build20191111 :** Vast changes.\n- **Build20191112 :** \n  - Added the ability to force flatten results.\n  - Added the ability to return a single record.\n- **Build20191114 :** Corrected `pg` package dependency.\n- **Build20191120 :** \n  - Added `connectionTimeoutMillis` and `idleTimeoutMillis` parameters.\n  - Added `DataAccess.Disconnect()` function (beta).\n- **Build20191219 :** `findByPk` function supports multiple primary keys. \n- **Build20200107 :** Resolved async issue for `autoSetTimeFields`\n- **Build20200116 :** Added `ssl`\n- **Build20200120 :** Bug fixes.\n- **Build20200212 :** Performance improvements.\n- **Build20200218 :** Bug fixes.\n- **Build20200409 :** Bug fixes and performance improvements.\n- **Build20200421 :** Added customize transaction functions\n  - BeginTransaction\n  - CommitTransaction\n  - RollbackTransaction\n- **Build20200423 :** Bug fixes\n- **Build20200427 :** Optimized client connections in `Transaction`\n- **Build20200514 :** Corrected `sortBy` option for build querying sql\n- **Build20200824 :** Bug fixes\n- **Build20200917 :** Corrected declaration and signature of parameters to  `Transaction` \n- **Build20201010 :** Upgraded `pg` to support PostgreSQL 13\n- **Build20201027 :** Try to resolve ssl connections failed issue\n- **Build20201029 :** Added `preserveClient` for leaving the client open for further operations in the transaction\n- **Build20210110 :** Throw error if no valid value to insert or update.\n- **Build20210619 :** Added safeguard in `deleteByConditions`\n- **Build20230619 :** Typo fixes\n- **Build20230703 :** Supported `IS` and `IS NOT` operators\n- **Build20231221 :** Supported POSIX and `SIMILAR TO` operators\n\n---\n\n## Installation\n\n- npm\n\n  ```bash\n  npm i pglink-lite --save\n  ```\n\n- yarn\n\n  ```bash\n  yarn add pglink-lite --save\n  ```\n\n---\n\n## Quick Example\n\n- Instance (_core/pglink.js_)\n\n  ```javascript\n  // core/pgsqlize.js\n  const { PgLink } = require('pglink-lite')\n  \n  const pglink = new PgLink({\n    host: 'http://192.168.1.100',\n    port: 5432,\n    userName: 'root',\n    password: '123456',\n    database: 'test',\n    connectionTimeoutMillis: 0,\n    idleTimeoutMillis: 60000,\n    globalAutoSetTimeFields: ['updatedAt'],\n    ssl: true\n  })\n  \n  module.exports.default = pglink\n  ```\n\n- Model (_models/users.js_)\n\n  ```javascript\n  // models/users.js\n  const pglink = require('../core/pglink')\n\n  class UserModel extends pglink.Model {\n    constructor() {\n      super({ tableName: 'users', pkName: 'userId'})\n    }\n  }\n\n  module.exports.default = UserModel\n  ```\n\n- Schema (_schemas/users.js_)\n\n  ```javascript\n  // schemas/users.js\n  // you need to install something for gql first, we use apollo-server here\n  const { gql } = require('apollo-server')\n\n  const typeDefs = gql`\n    type User {\n      userId: ID!\n      userName: String\n      status: Boolean\n    }\n  \n  \tinput UserInsertInput {\n      userName!: String\n  \t}\n  \n  \tinput UserEditInput {\n      userId!: ID\n      userName: String\n      status: Boolean\n  \t}\n  \n  \ttype Query {\n  \t\tgetUserById(userId: ID!): User\n  \t}\n  \n  \ttype Mutation\t{\n  \t\tinsertUser(user: UserInsertInput): User\n  \t\teditUser(user: UserEditInput): User\n  \t}\n  `\n  module.exports.default = typeDefs\n  ```\n\n- Resolver (_resolvers/users.js_)\n\n  ```javascript\n  // resolvers/users.js\n  const UserModel = require('../models/users.js')\n  \n  const getUserById = async (_, args) =\u003e {\n    const inst = new UserModel()\n    const res = await inst.findByPk({ pk: args.userId })\n    return res\n  }\n  \n  const insertUser = async (_, args) =\u003e {\n    const inst = new UserModel()\n    const res = await inst.insertOne({ params: args.user })\n    return res\n  }\n  \n  const editUser = async (_, args) =\u003e {\n    const inst = new UserModel()\n    const res = await inst.updateByPk({ params: args.user })\n    return res\n  }\n  \n  module.exports = {\n    getUserById,\n    insertUser,\n    editUser\n  }\n  ```\n\n---\n\n## Usage\n\n- **Import library package**\n\n  ```javascript\n  import { PgLink } from 'pglink-lite'\n  // or\n  import PgLink from 'pglink-lite'\n  // or\n  const { PgLink } = require('pglink-lite')\n  // or\n  const PgLink = require('pglink-lite')\n  ```\n\n- **Instantiate `PgLink`**\n\n  ```javascript\n  export const pglink = new PgLink({\n    host: 'http://192.168.1.100',\n    port: 5432,\n    userName: 'root',\n    password: '123456',\n    database: 'test'\n  })\n  ```\n\n  - Props: `object`\n\n    | Key                     | Type            | Introduction                                                                                                                                                                                                                       | Default value |\n    | ----------------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- |\n    | host                    | `string`        | Postgresql server host                                                                                                                                                                                                             | \"localhost\"   |\n    | port                    | `number`        | Postgresql server port                                                                                                                                                                                                             | 5432          |\n    | userName                | `string`        | Postgresql server user name                                                                                                                                                                                                        | \"postgres\"    |\n    | password                | `string`        | Postgresql server password                                                                                                                                                                                                         | \"\"_(empty)_   |\n    | database                | `string`        | Postgresql database name                                                                                                                                                                                                           | \"postgres\"    |\n    | connectionMax           | `number`        | Postgresql database max connection                                                                                                                                                                                                 | 10            |\n    | connectionTimeoutMillis | `number`        | Number of milliseconds to wait before timing out when connecting a new client, by default this is 0 which means no timeout                                                                                                         | 0             |\n    | idleTimeoutMillis       | `number`        | Number of milliseconds a client must sit idle in the pool and not be checked out, before it is disconnected from the backend and discarded, default is 10000 (10 seconds) - set to 0 to disable auto-disconnection of idle clients | 10000         |\n    | globalAutoSetTimeFields | `Array\u003cstring\u003e` | To define fields that should be automatically updated with a current timestamp                                                                                                                                                     | []            |\n    | ssl                     | `boolean`       | To connect to pg using ssl                                                                                                                                                                                                         | false         |\n- **Inherit and declare model**\n\n  ```javascript\n  // example\n  class xxxModel extends pglink.Model {\n    constructor(params) {\n      super({\n        tableName: 'users',\n        pkName: 'No',\n        enumMapping: {\n          sex: { MALE: 1, FAMALE: 0 },\n          role: { STUDENT: 1, TEACHER: 2 }\n        }\n      })\n    }\n    // if you need rewrite inner funtions or add some functions, write here\n  }\n  ```\n\n  - constructor props : `object`\n\n  | Key         | Type     | Introduction                                                                                         | Required |\n  | ----------- | -------- | ---------------------------------------------------------------------------------------------------- | -------- |\n  | tableName   | `string` | the data table in postgresql you need to operate                                                     | true     |\n  | pkName      | `string` | the name of primary key in the data table, default `id`                                              | false    |\n  | enumMapping | `object` | to defined the key and value, key should be included in the fields, e.g. {role: {ADMIN: 0, USER: 1}} | false    |\n\n  - inner properties or functions\n\n    1. **dataAccess**\n\n       - Introduction\n\n         A data table operator (CRUD)\n\n       - see the details below\n\n    2. **findAll**\n\n       - Introduction\n\n         A function for querying all rows from one table\n\n       - Parameters\n\n          {\n            `options`: object, default {\n                sortBy: undefined,\n                limit: undefined,\n                offset: undefined\n            }\n\n            `preserveClient`: boolean\n\n            `callback`: function\n          }\n\n       - Returns\n\n         (Promise) All rows data or error\n\n    3. **findByPk**\n\n       - Introduction\n\n         A function for querying by primary key\n\n       - Parameters\n\n         { \n         \n          `pkValue`: string | number | object \n  \n           - if multiple primary keys, should use object, e.g. {id: 1, cid: 2}\n  \n           `selectFields`: string, default \\*\n  \n           `callback`: function\n\n           `preserveClient`: boolean\n         \n          }\n  \n       - Returns\n\n         (Promise) One row data or error\n\n    4. **findByConditions**\n\n       - Introduction\n\n         A function for querying by conditions\n\n       - Parameters\n\n          {\n            `whereClause`: string. (e.g. ' name = \"Tim\" ')\n\n            `selectFields`: string, default \\*\n\n            `options`: object, default {\n              sortBy: undefined,\n              limit: undefined,\n              offset: undefined\n            }\n\n            `preserveClient`: boolean\n\n            `callback`: function\n          }\n\n       - Returns\n\n         (Promise) Some rows data or error\n\n    5. **InsertOne**\n\n       - Introduction\n\n         A function for inserting one row to a table\n\n       - Parameters\n\n         {\n    \n           `params`: object. (data from resolver)\n    \n           `callback`: function\n\n           `client`: object\n\n           `preserveClient`: boolean\n    \n         }\n    \n       - Returns\n\n         (Promise) Inserted row data or errors\n\n    6. **multiInsert**\n\n       - Introduction\n\n         A function for inserting multi rows to a table\n\n       - Parameters\n\n         {\n    \n          `items`: Array\\\u003cobject\\\u003e. (data from resolver)\n    \n          `forceFlat`?: boolean (whether or not to force results into a single array)\n\n          `callback`: function\n\n          `client`: object\n\n          `preserveClient`: boolean\n    \n         }\n    \n       - Returns\n\n         (Promise) Inserted rows data or errors\n\n    7. **updateByPk**\n\n       - Introduction\n\n         A function for updating by primary key\n\n       - Parameters\n\n         {\n       `params`: object. (data from resolver, have to include pkName and pkValue)\n    \n           `autoSetTimeFields`: Those fields need to set time automatically, should be included in items\n\n           `callback`: function\n\n           `client`: object\n\n           `preserveClient`: boolean\n     }\n    \n       - Returns\n\n         (Promise) updated row data or errors\n\n    8. **updateByConditions**\n\n       - Introduction\n\n         A function for updating by conditions\n\n       - Parameters\n\n         {\n       `params`: object. (data from resolver)\n    \n           `whereClause`: string. (e.g. ' name = \"Tim\" ')\n\n           `autoSetTimeFields`: Those fields need to set time automatically, should be included in items\n\n           `callback`: function\n         \n           `client`: object\n\n           `preserveClient`: boolean\n    }\n    \n       - Returns\n\n         (Promise) updated rows data or errors\n\n    9. **multiUpdateWithConditions**\n\n       - Introduction\n\n         A function for multi updating by conditions\n\n       - Parameters\n\n         {\n       `items`: Array\\\u003cobject\\\u003e. (data from resolver)\n    \n           `whereClause`: string with replacements. (e.g. ' company = \\$1 ')\n\n           `replacementFields`: Array\\\u003cstring\\\u003e (e.g. ['company'])\n\n           `autoSetTimeFields`: Those fields need to set time automatically, should be included in items\n\n           `forceFlat`?: boolean (if true, forces results into a single array)\n\n           `callback`: function\n\n           `client`: object\n\n           `preserveClient`: boolean\n     }\n    \n       - Returns\n\n         (Promise) Updated rows data or errors\n\n    10. **deleteByConditions**\n\n        - Introduction\n\n          A function for deleting by conditions\n\n        - Parameters\n\n          {\n        `whereClause`: string. (e.g. ' \"companyId\" = 1001 ')\n    \n            `returnSingleRecord?`: boolean (if true, returns just one record)\n\n            `callback`: function\n\n            `client`: object\n\n            `preserveClient`: boolean\n        }\n        - Returns\n    \n          (Promise) Deleted rows data or errors\n\n    11. **encodeFromEnum**\n\n        - Introduction\n\n          A function for encoding the enum to integer value\n\n        - Parameters\n\n          `data`: object | Array. (input data)\n\n        - Returns\n\n          (Object) Same structure of input data, with encoded enum\n\n    12. **decodeToEnum**\n\n        - Introduction\n\n          A function for decoding the enum from integer value\n\n        - Parameters\n\n          `data`: object | Array. (output data)\n\n        - Returns\n\n          (Object) Same structure of output data, with decoded enum\n\n  - `dataAccess` functions\n\n    1. **Execute**\n\n       - Introduction\n\n         to run a single and simple sql\n\n       - Parameters:\n\n         - sql: string\n\n       - Returns\n\n         reponse from database\n       \n       - Example:\n         ```javascript\n           const sqlStatement = `SQL STATEMENT GOES HERE`\n           const res = await this.dataAccess.Execute(sqlStatement);\n         ```\n       \n    2. **Transaction**\n    \n       - Introduction\n    \n         core function with transaction\n    \n       - Parameters:\n    \n         ```javascript\n          args: {\n             params: Array\u003c{\n             sql: string\n             replacements?: Array\u003cany\u003e\n             alias?: string // to distinguish responses\n             }\u003e\n           client?: object\n           returnWithAlias?: boolean, // if true, return res with alias\n           returnSingleRecord?: boolean,\n           forceFlat?: boolean,\n           preserveClient?: boolean // Skips committing the operation, leaving the client open for further operations in the transaction\n          },\n          transaction: Function // callback function or Transaction\n         ```\n    \n       - Returns\n    \n         reponse from database\n    \n    3. **GenerateInsertSQL**\n    \n       - Introduction\n    \n         generate insert sql object\n    \n       - Parameters\n    \n         ```javascript\n         params: object, //data from resolver, includes inserted fields and values\n         tableName: string //name of inserted table\n         ```\n    \n       - Returns\n    \n         ```javascript\n         {\n           sql: string\n           replacement: Array\u003cany\u003e\n           tableName: string\n         }\n         ```\n    \n    4. **GenerateMultiInsertSQL**\n    \n       - Introduction\n    \n         generate bulk insert sql object\n    \n       - Parameters\n    \n         ```js\n         insertFields: Array\u003cstring\u003e,\n         params: object, //data from resolver, includes inserted fields and values\n         tableName: string //name of inserted table\n         ```\n    \n       - Returns\n    \n         ```javascript\n         {\n           sql: string\n           replacement: Array\u003cany\u003e\n           tableName: string\n         }\n         ```\n    \n    5. **GenerateUpdateSQL**\n    \n       - Introduction\n    \n         generate update sql object\n    \n       - Parameters\n    \n         ```javascript\n         {\n         \t/** an object includes the fields and values you want to update */\n           params: object\n           /** the name of table */\n           tableName: string\n           /** e.g. \"employeeId\" = '123' */\n           whereClause?: string\n           /** the name of primary key, default 'id' */\n           pkName?: string\n           /** those fields need to set time automatically, default value is from globalAutoSetTimeFields. We will check whether fields included in the table, if not, skip */\n           autoSetTimeFields?: Array\u003cstring\u003e\n         }\n         ```\n    \n       - Returns\n    \n         ```javascript\n         {\n           sql: string\n           replacement: Array\u003cany\u003e\n           tableName: string\n         }\n         ```\n    \n    6. **InsertExecutor**\n    \n       - Introduction\n    \n         execute insert sql\n    \n       - Parameters\n    \n         ```js\n         params: object, //data from resolver, includes inserted fields and values\n         tableName: string, //name of inserted table\n         callback?: function, //function to run before committing the transaction\n         client?: object //the pg client to be used for the transaction\n         preserveClient?: boolean // skips comitting the client if true\n         ```\n    \n       - Returns\n    \n         response from database\n    \n    7. **MultiInsertToOneTableExecutor**\n    \n       - Introduction\n    \n         execute insert sqls to one table\n    \n       - Parameters\n    \n         ```js\n         insertFields: Array\u003cstring\u003e,\n         params: object, //data from resolver, includes inserted fields and values\n         tableName: string, //name of inserted table\n         callback?: function, //function to run before committing the transaction\n         client?: object //the pg client to be used for the transaction\n         preserveClient?: boolean // skips comitting the client if true\n         ```\n    \n       - Returns\n    \n         response from database\n    \n    8. **MultiInsertExecutor**\n    \n       - Introduction\n    \n         execute insert sqls to deferent tables\n    \n       - Parameters\n    \n         ```javascript\n         Array\u003c\n         {\n           params: object, //data from resolver, includes inserted fields and values\n           tableName: string //name of inserted table\n         }\u003e,\n         forceFlat?: boolean, //if true, forces results into one array\n         callback?: function, //function to run before committing the transaction\n         client?: object //the pg client to be used for the transaction\n         preserveClient?: boolean // skips comitting the client if true\n         ```\n    \n       - Returns\n    \n         response from database\n    \n    9. **UpdateByPkExecutor**\n    \n       - Introduction\n    \n         execute update sql by primary key\n    \n       - Parameters\n    \n         ```javascript\n         params: object, //data from resolver, includes updated fields and values\n         tableName: string, //name of inserted table\n         pkName?: string, //the name of primary key\n         autoSetTimeFields?: Array\u003cstring\u003e ,//those fields need to set time automatically\n         callback?: function, //function to run before committing the transaction\n         client?: object //the pg client to be used for the transaction\n         preserveClient?: boolean // skips comitting the client if true\n         ```\n    \n       - Returns\n    \n         response from database\n    \n    10. **UpdateExecutor**\n    \n        - Introduction\n    \n          execute update sql by conditions\n    \n        - Parameters\n    \n          ```javascript\n          params: object, //data from resolver, includes updated fields and values\n          tableName: string, //name of inserted table\n          whereClause?: string, //e.g. \"employeeId\" = '123'\n          autoSetTimeFields?: Array\u003cstring\u003e, //those fields need to set time automatically\n          callback?: function, //function to run before committing the transaction\n          client?: object //the pg client to be used for the transaction\n          preserveClient?: boolean // skips comitting the client if true\n          ```\n    \n        - Returns\n    \n          response from database\n    \n    11. **MultiUpdateExecutor**\n    \n        - Introduction\n    \n          execute bulk update sqls by conditions\n    \n        - Parameters\n    \n          ```javascript\n          Array\u003c\n            {\n            params: object, //data from resolver, includes updated fields and values\n              tableName: string, //name of inserted table\n              whereClause?: string //e.g. \"employeeId\" = '123'\n              pkName: string, //the name of primary key\n              autoSetTimeFields?: Array\u003cstring\u003e, //those fields need to set time automatically\n              client?: object //the pg client to be used for the transaction\n            }\u003e,\n            forceFlat?: boolean //if true, forces results into a single array\n            callback?: function //function to run before committing the transaction\n            preserveClient?: boolean // skips comitting the client if true\n          ```\n    \n        - Returns\n    \n          response from database\n    \n    12. **DeleteExecutor**\n    \n        - Introduction\n    \n          execute delete sql by conditions\n    \n         - Parameters\n    \n           ```javascript\n           tableName: string, //name of inserted table\n           whereClause?: string, //e.g. \"employeeId\" = '123'\n           returnSingleRecord?: boolean,//if true, returns one record instead of array\n           callback?: function, //function to run before committing the transaction\n           client?: object //the pg client to be used for the transaction\n           preserveClient?: boolean // skips comitting the client if true\n           ```\n        \n        - Returns\n        \n        response from database\n    \n    \n    13. **SingleQueryExecutor**\n    \n        - Introduction\n    \n          execute query sql\n    \n        - Parameters\n    \n          ```javascript\n          {\n             /** the name of table */\n           \ttableName: string\n             /** e.g. \"employeeId\" = '123' */\n             whereClause: string\n             /** the fields what you want to select, default * */\n             selectFields?: string\n             /** the field name for sorting, e.g.: [{field: 'id', sequence:'DESC'}] */\n             sortBy?: Array\u003c{ field: String; sequence?: 'ASC' | 'DESC' }\u003e\n             /** to limit the count of rows you want to query */\n             limit?: number\n             /** how many rows you want to skip */\n             offset?: number,\n            /** if true, return a single record instead of an array */\n             returnSingleRecord?: boolean,\n             client?: object //the pg client to be used for the transaction\n             preserveClient?: boolean // skips comitting the client if true\n          }\n          ```\n    \n        - Returns\n    \n          response from database\n        \n    14. **Disconnect** [Beta Function]\n    \n        - Introduction\n    \n          It will drain the pool of all active clients, disconnect them, and shut down any internal timers in the pool. It is common to call this at the end of a script using the pool or when your process is attempting to shut down cleanly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjandenma%2Fpglink-lite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjandenma%2Fpglink-lite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjandenma%2Fpglink-lite/lists"}