{"id":19963269,"url":"https://github.com/bilbottom/pycharm-extensions","last_synced_at":"2025-03-01T16:44:16.368Z","repository":{"id":262542955,"uuid":"616025678","full_name":"Bilbottom/pycharm-extensions","owner":"Bilbottom","description":"Custom PyCharm database extensions.","archived":false,"fork":false,"pushed_at":"2023-04-02T09:59:35.000Z","size":131,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T08:17:30.697Z","etag":null,"topics":["groovy","pycharm"],"latest_commit_sha":null,"homepage":"","language":"Groovy","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/Bilbottom.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-19T12:01:37.000Z","updated_at":"2023-04-02T09:19:20.000Z","dependencies_parsed_at":"2024-11-13T03:15:21.154Z","dependency_job_id":null,"html_url":"https://github.com/Bilbottom/pycharm-extensions","commit_stats":null,"previous_names":["bilbottom/pycharm-extensions"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bilbottom%2Fpycharm-extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bilbottom%2Fpycharm-extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bilbottom%2Fpycharm-extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bilbottom%2Fpycharm-extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bilbottom","download_url":"https://codeload.github.com/Bilbottom/pycharm-extensions/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241396754,"owners_count":19956405,"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":["groovy","pycharm"],"created_at":"2024-11-13T02:15:26.820Z","updated_at":"2025-03-01T16:44:16.343Z","avatar_url":"https://github.com/Bilbottom.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"Custom PyCharm Database Extensions\n---\n[PyCharm Professional](https://www.jetbrains.com/pycharm) ships with some `.groovy` scripts as database extensions. This repo adds additional ones to these (mainly just tweaking the existing scripts!).\n\n\u003e The official documentation for PyCharm's database extensions can be found at:\n\u003e \n\u003e - https://www.jetbrains.com/help/pycharm/relational-databases.html\n\u003e \n\u003e The aggregators and extractors are documented, respectively, at:\n\u003e - https://www.jetbrains.com/help/pycharm/table-editor.html#aggregate-view\n\u003e - https://www.jetbrains.com/help/pycharm/data-extractors.html\n\n\n### Where are the database extensions?\n\nIn the project view, you can find the database extensions under **Scratches and Consoles**:\n\n\u003cdiv style=\"text-align: center;\"\u003e\n\n![database-extensions](docs/database-extensions.png)\n\n\u003c/div\u003e\n\nNew scripts can be added here directly and will automatically be available in the IDE -- across all projects!\n\n\n### Where are the database extensions used?\n\nPlease refer to the official aggregator and extractor documentation:\n- https://www.jetbrains.com/help/pycharm/table-editor.html#aggregate-view\n- https://www.jetbrains.com/help/pycharm/data-extractors.html\n\n\n# Custom Extensions\n\nThis repo adds the following extensions:\n\n- **Aggregators**\n  - [COUNT_CHARS.groovy](pycharm-extensions/data/aggregators/COUNT_CHARS.groovy)\n  - [COUNT_DISTINCT.groovy](pycharm-extensions/data/aggregators/COUNT_DISTINCT.groovy)\n  - [COUNT_NULLS.groovy](pycharm-extensions/data/aggregators/COUNT_NULLS.groovy)\n  - [HAS_BAD_CHARS.groovy](pycharm-extensions/data/aggregators/HAS_BAD_CHARS.groovy)\n- **Extractors**\n  - [Jira-Server.md.groovy](pycharm-extensions/data/extractors/Jira-Server.md.groovy)\n  - [One-Row.sql.groovy](pycharm-extensions/data/extractors/One-Row.sql.groovy)\n  - [SQL-Where.sql.groovy](pycharm-extensions/data/extractors/SQL-Where.sql.groovy)\n\nDetails will be added below with the following example table:\n\n|  id | name             | date_of_birth | surname_ipa                              |\n|----:|:-----------------|:--------------|:-----------------------------------------|\n|   1 | William Shatner  | 1931-03-22    | \u003cspan style=\"color:grey\"\u003e\\\u003cnull\\\u003e\u003c/span\u003e |\n|   2 | Leonard Nimoy    | 1931-03-26    | /ˈniːmɔɪ/                                |\n|   3 | Nichelle Nichols | 1932-12-28    | /nɪˈʃɛl/                                 |\n\n\n## Database Aggregators\n\n### [COUNT_CHARS.groovy](pycharm-extensions/data/aggregators/COUNT_CHARS.groovy)\n\nCount the total number of characters across the selection. Intended to be used on a single cell at a time to quickly determine the length of its contents, but can be used on many cells to get the total number of characters over them.\n\n![count-chars-groovy](docs/count-chars-groovy.png)\n\n\n### [COUNT_DISTINCT.groovy](pycharm-extensions/data/aggregators/COUNT_DISTINCT.groovy)\n\nCount the number of distinct cells in the selection. Note that null values are not ignored and will count as a distinct value.\n\n![count-distinct-groovy](docs/count-distinct-groovy.png)\n\n\n### [COUNT_NULLS.groovy](pycharm-extensions/data/aggregators/COUNT_NULLS.groovy)\n\nCount the number of cells that have a null value.\n\n![count-nulls-groovy](docs/count-nulls-groovy.png)\n\n\n### [HAS_BAD_CHARS.groovy](pycharm-extensions/data/aggregators/HAS_BAD_CHARS.groovy)\n\nCount the number of cells (not the number of characters) that have at least one \"bad character\". As an English speaker, a \"good character\" is any character between a space (` `, U+0020) and a tilde (`~`, U+0126) on the ASCII/unicode scale, and a \"bad character\" is any character that is not a \"good character\". Null values are not counted (but the null character, U+0000, is).\n\n![has-bad-chars-groovy](docs/has-bad-chars-groovy.png)\n\n\n## Database Extractors\n\n### [Jira-Server.md.groovy](pycharm-extensions/data/extractors/Jira-Server.md.groovy)\n\nFormat the cells appropriately for Jira Server. This is a modified version of the Markdown-Groovy extractor, but tweaked to return Atlassian server's wiki markup instead of Markdown.\n\nLike the build-in Markdown extractor, this has different outputs depending on whether the result set is transposed or not.\n\n#### Default\n\nCopy:\n\n![jira-server-md-groovy-default](docs/jira-server-md-groovy-default.png)\n\nPaste:\n```\n|| ID || NAME || DATE_OF_BIRTH || SURNAME_IPA ||\n| 1 | William Shatner | 1931-03-22 | null |\n| 2 | Leonard Nimoy | 1931-03-26 | /ˈniːmɔɪ/ |\n| 3 | Nichelle Nichols | 1932-12-28 | /nɪˈʃɛl/ |\n```\n\n#### Transposed\n\nCopy:\n\n![jira-server-md-groovy-transposed](docs/jira-server-md-groovy-transposed.png)\n\nPaste:\n```\n|| || || || |\n| ID | 1 | 2 | 3 |\n| NAME | William Shatner | Leonard Nimoy | Nichelle Nichols |\n| DATE_OF_BIRTH | 1931-03-22 | 1931-03-26 | 1932-12-28 |\n| SURNAME_IPA | null | /ˈniːmɔɪ/ | /nɪˈʃɛl/ |\n```\n\n\n### [One-Row.sql.groovy](pycharm-extensions/data/extractors/One-Row.sql.groovy)\n\nSimply join the selected cells (values only) using a comma and space as a separator, quoting the values if needed. Handy for copying values to put inside an `IN` statement.\n\nCopy:\n\n![one-row-sql-groovy](docs/one-row-sql-groovy.png)\n\nPaste:\n```\n1, 'William Shatner', 2, 'Leonard Nimoy'\n```\n\n\n### [SQL-Where.sql.groovy](pycharm-extensions/data/extractors/SQL-Where.sql.groovy)\n\nJoin the selected cells' values with the column names ready to be pasted into a `WHERE` clause. Intended to be used for a single row at a time, but can be used on many.\n\nCopy:\n\n![one-row-sql-groovy](docs/one-row-sql-groovy.png)\n\nPaste:\n```\nWHERE 1=1\nAND id = 1\nAND name = 'William Shatner'\nAND id = 2\nAND name = 'Leonard Nimoy'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilbottom%2Fpycharm-extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbilbottom%2Fpycharm-extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbilbottom%2Fpycharm-extensions/lists"}