{"id":16294715,"url":"https://github.com/valve/active_support_pg","last_synced_at":"2025-04-09T12:47:22.059Z","repository":{"id":19444296,"uuid":"22688271","full_name":"Valve/active_support_pg","owner":"Valve","description":"ActiveSupport helpers implemented in pl/pgsql","archived":false,"fork":false,"pushed_at":"2014-08-12T11:17:37.000Z","size":188,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T23:45:43.052Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/Valve.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-08-06T15:42:32.000Z","updated_at":"2019-04-05T17:51:55.000Z","dependencies_parsed_at":"2022-09-05T16:01:13.218Z","dependency_job_id":null,"html_url":"https://github.com/Valve/active_support_pg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valve%2Factive_support_pg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valve%2Factive_support_pg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valve%2Factive_support_pg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Valve%2Factive_support_pg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Valve","download_url":"https://codeload.github.com/Valve/active_support_pg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248045221,"owners_count":21038553,"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":[],"created_at":"2024-10-10T20:16:15.616Z","updated_at":"2025-04-09T12:47:22.036Z","avatar_url":"https://github.com/Valve.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"active_support_pg\n=================\n\n## This is a work in progress, contributions are welcome.\n\nEver wanted to have your ActiveSupport helpers in your PostgreSQL\ndatabase?\n\nNow you can:\n\n### Parameterize\n\n```sql\nselect parameterize('Ég elska Ísland mjög-mikið');\n--------------------------\n eg-elska-sland-mjog-miki\n\nfivesearch=# select parameterize('---**I love iceland**---');\n----------------\n i-love-iceland\n\n\nselect parameterize('I love 中國');\n--------------\n i-love\n```\n\n### Pluralize\n\n```sql\nselect pluralize('person');\n-------------\npeople\n\nselect pluralize('woman');\n-------------\nwomen\n\nselect pluralize('fox');\n-------------\nfoxes\n```\n\n### Humanize\n\n```sql\nselect humanize('i_love_postgres');\n-------------\nI love postgres\n\nselect humanize('person_id');\n-------------\nPerson\n\n```\n\n### Dasherize\n\n```sql\nselect humanize('i_love_postgres');\n-------------\ni-love-postgres\n\n```\n\nAll functions are written in PG/PGSQL language.\n\nTo use them in your database, run the contents of `src/as.sql` inside your\nmigration:\n\n```ruby\ndef up\n  sql = File.read(Rails.root.join('db/scripts/as.sql'))\n  execute sql\nend\n```\n\nTo drop them, add the contents of `src/as_drop.sql` to the `down`\nsection of the migration:\n\n```ruby\ndef down\n  sql = File.read(Rails.root.join('db/scripts/as_drop.sql'))\n  execute sql\nend\n```\n\n\n## Running tests (requires ruby \u0026 PostgreSQL)\n\n1. cd into the directory and `bundle install`\n1. Copy the `database.yml.example` to `database.yml`\n2. Change your connection settings in `database.yml`\n3. Run  `rake setup` (only once)\n4. Run `rake test`\n\n\n## Licence\n\nThis code is MITlicenced:\n\nCopyright (c) 2014 Valentin Vasilyev\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalve%2Factive_support_pg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalve%2Factive_support_pg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalve%2Factive_support_pg/lists"}