{"id":18304553,"url":"https://github.com/numtel/sails-postgresql-live-select","last_synced_at":"2026-02-24T02:32:27.084Z","repository":{"id":57356056,"uuid":"44499502","full_name":"numtel/sails-postgresql-live-select","owner":"numtel","description":"SailsJS Connection adapter for live real time PostgreSQL result set updates","archived":false,"fork":false,"pushed_at":"2015-10-18T23:42:14.000Z","size":260,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T02:04:31.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/numtel.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}},"created_at":"2015-10-18T22:38:06.000Z","updated_at":"2025-08-27T11:20:38.000Z","dependencies_parsed_at":"2022-09-26T16:32:05.117Z","dependency_job_id":null,"html_url":"https://github.com/numtel/sails-postgresql-live-select","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/numtel/sails-postgresql-live-select","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numtel%2Fsails-postgresql-live-select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numtel%2Fsails-postgresql-live-select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numtel%2Fsails-postgresql-live-select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numtel%2Fsails-postgresql-live-select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/numtel","download_url":"https://codeload.github.com/numtel/sails-postgresql-live-select/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numtel%2Fsails-postgresql-live-select/sbom","scorecard":{"id":698704,"data":{"date":"2025-08-11","repo":{"name":"github.com/numtel/sails-postgresql-live-select","commit":"7d95671c1057eea91361565105d3883295ff2067"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/4 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T04:32:13.208Z","repository_id":57356056,"created_at":"2025-08-22T04:32:13.209Z","updated_at":"2025-08-22T04:32:13.209Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29769176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T01:40:24.820Z","status":"online","status_checked_at":"2026-02-24T02:00:07.497Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-05T15:29:19.570Z","updated_at":"2026-02-24T02:32:27.052Z","avatar_url":"https://github.com/numtel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sails-postgresql-live-select [![Build Status](https://travis-ci.org/numtel/sails-postgresql-live-select.svg?branch=master)](https://travis-ci.org/numtel/sails-postgresql-live-select)\n\nA [Sails](http://sailsjs.org) connection adapter to use [the `pg-live-select` NPM Package](https://github.com/numtel/pg-live-select) in order to provide live (real time) result sets for models.\n\n## Example\n\nSee the [chat room example application](https://github.com/numtel/sails-postgresql-live-select-chat-example) for a full working demonstration of this package.\n\n## Installation\n\nTo be used alongside the [`sails-postgresql` connection adapter](https://github.com/balderdashy/sails-postgresql).\n\n1. Install the package:\n\n    ```bash\n    npm install --save sails-postgresql-live-select\n    ```\n\n2. Add the connection settings to your `config/connections.js`:\n\n    ```javascript\n    livePg: {\n      adapter: 'sails-postgresql-live-select',\n      // Connection details must be passed as url, not individually\n      url: 'postgres://sails:sails@localhost:5432/sails_test',\n      // Unique channel required for asynchronous notifications\n      channel: 'sails_test'\n    }\n    ```\n\n3. Add the adapter to be used on your models, for example in `config/models.js`:\n\n    ```javascript\n      connection: [ 'postgresql', 'livePg' ],\n    ```\n\n## Usage\n\n### YourModel.liveFind(options, [condition])\n\nThis adapter adds a `liveFind` method to your models.\n\nArgument | Type | Description\n----------|------|-----------\n`options` | Object | Find options as defined by [Waterline Query Language](http://sailsjs.org/documentation/concepts/models-and-orm/query-language)\n`condition` | Function | Optional function for validating if result set should be refreshed on row change. See [condition function documentation for pg-live-select](https://github.com/numtel/pg-live-select#trigger-object-definitions)\n\nThe `liveFind` method returns a [`SelectHandle` object as defined by pg-live-select](https://github.com/numtel/pg-live-select#selecthandle-class).\n\nFor example, listen for the `update` event in your controller actions to send changes to the client:\n\n```javascript\nvar myLiveSelect = MyModel.liveFind({},\n  function(row) {\n    // Optional data invalidation callback\n    // Check if data is invalidated by this row change\n    console.log('Row data', row);\n    return true;\n  }\n).on('update',\n  function(diff, data) {\n    // Results have changed, send to client\n    sails.sockets.emit(req.socket.id, 'chatDiff', diff);\n  }\n);\n```\n\nWhen done listening for updates to a query, be sure to call the `stop()` method on the returned `SelectHandle` object to prevent memory leaks.\n\n## Running Tests\n\n```bash\n# Configure PostgreSQL server settings\nvim test/config/connections.js\n# Run suite\nnpm test\n```\n\nTest execution code is in [`test/config/bootstrap.js`](test/config/bootstrap.js).\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumtel%2Fsails-postgresql-live-select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnumtel%2Fsails-postgresql-live-select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumtel%2Fsails-postgresql-live-select/lists"}