{"repo":"vitaly-t/pg-monitor","free":true,"listed":false,"github":"https://github.com/vitaly-t/pg-monitor","clone":"git clone https://github.com/vitaly-t/pg-monitor.git","description":":computer: Events monitor for pg-promise","language":"JavaScript","stars":152,"topics":["postgresql","query","monitoring","pg-promise","nodejs"],"license":"MIT","category":"analytics","readme_excerpt":"pg-monitor =========== Events monitor for [pg-promise]. About Installing Testing Usage API - attach - isAttached - detach - connect - disconnect - query - task - transact - error - detailed - setTheme - log Themes Useful Tips About This library takes the flexible event system provided by [pg-promise] and outputs it on screen, with full details available, and in the most informative way. Its purpose is to give you the full picture of how the database is used in your application, providing full details with the context, such as tasks and transactions in which queries are executed. In addition, it simplifies events logging for your application. Installing The library has no direct dependency on [pg-promise]. Testing Clone the repository (or download, if you prefer): Install the library's DEV dependencies: To run all tests: To run all tests with coverage: Usage Method attach is to provide the quickest way to start using the library, by attaching to a set of events automatically. If, however, you want to have full control over event handling, you can use the manual event forwarding. Example of forwarding events [query] and [error] manually: See the API below for all the methods and options that you have. Below is a safe forwarding implemented in TypeScript, for events connect , disconnect and query . It works the same for all other events. API attach(options, [events], [override]) Alternative Syntax: attach({options, events, override}); Adds event handlers to object initOptions th","default_branch":null,"files":null,"tree":[],"storefront":"/r/vitaly-t","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/vitaly-t/pg-monitor/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}