{"id":31059937,"url":"https://github.com/thecoderadi/query-extractor","last_synced_at":"2025-09-15T09:53:25.260Z","repository":{"id":313650096,"uuid":"1049243348","full_name":"TheCoderAdi/query-extractor","owner":"TheCoderAdi","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-07T14:30:45.000Z","size":171,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-07T16:25:49.133Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TheCoderAdi.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-02T17:33:39.000Z","updated_at":"2025-09-07T14:30:48.000Z","dependencies_parsed_at":"2025-09-07T16:25:50.974Z","dependency_job_id":"8f1c9072-bcc2-423b-a975-adc0a1da07f8","html_url":"https://github.com/TheCoderAdi/query-extractor","commit_stats":null,"previous_names":["thecoderadi/query-extractor"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/TheCoderAdi/query-extractor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCoderAdi%2Fquery-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCoderAdi%2Fquery-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCoderAdi%2Fquery-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCoderAdi%2Fquery-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheCoderAdi","download_url":"https://codeload.github.com/TheCoderAdi/query-extractor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheCoderAdi%2Fquery-extractor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275239208,"owners_count":25429487,"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","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","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":"2025-09-15T09:53:20.329Z","updated_at":"2025-09-15T09:53:25.221Z","avatar_url":"https://github.com/TheCoderAdi.png","language":"JavaScript","readme":"# Query Extractor VS Code Extension\n\nA simple VS Code extension to **extract variables** from SQL queries and copy them to your clipboard.\n\n## ✨ Features\n\n- Extracts variables of the form `${variableName}` from SQL queries.\n- Ignores comments (`--` and `/* */`) by default.\n- Works for both:\n  - Whole `.sql` files\n  - Selected text inside any file\n- Automatically copies the found variables as a comma-separated list to your clipboard.\n- Shows a notification with the count of variables copied.\n\n---\n\n## 🚀 Usage\n\n1. Open a `.sql` file or select a SQL query snippet.\n2. Run the command **`Query Extractor: Extract Variables`**:\n   - Open **Command Palette** (`Ctrl+Shift+P` / `Cmd+Shift+P` on macOS).\n   - Search for **\"Query Extractor: Extract Variables\"**.\n3. If variables are found:\n   - They are copied to your clipboard.\n   - You’ll see a message like `Copied 3 variables to clipboard`.\n\n---\n\n## 📦 Example\n\n```sql\n-- Sample SQL\nSELECT *\nFROM users\nWHERE id = ${userId}\nAND status = ${status}\nAND role = ${userRole};\n```\n\n**Extracted Variables:**\n\n```\nstatus, userId, userRole\n```\n\n---\n\n## ⚙️ Installation (Local Dev)\n\n1. Clone or download this repository.\n2. Run `npm install` to install dependencies.\n3. Open the project in VS Code.\n4. Press `F5` to launch a new VS Code window with the extension loaded.\n5. Run the command from the Command Palette.\n\n---\n\n## 🛠️ Development Notes\n\n- Variables are matched using the regex:\n\n  ```regex\n  (?\u003c!\\\\)(?:['\"])?\\$\\{\\s*([A-Za-z_][A-Za-z0-9_\\.]*)\\s*\\}(?:['\"])?\n  ```\n\n- This ensures escaped variables (`\\${var}`) are ignored.\n\n- Comments are stripped before parsing.\n\n---\n\n## 📜 License\n\nMIT License\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecoderadi%2Fquery-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthecoderadi%2Fquery-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthecoderadi%2Fquery-extractor/lists"}