{"id":51587908,"url":"https://github.com/denzyldick/polyquery","last_synced_at":"2026-07-11T12:30:43.607Z","repository":{"id":369557575,"uuid":"1289937118","full_name":"denzyldick/polyquery","owner":"denzyldick","description":" An LSP server that detects embedded SQL in 15+ programming languages, validates syntax with tree-sitter-sequel, provides schema-aware autocomplete, and can execute queries against live PostgreSQL / SQLite / MySQL databases.","archived":false,"fork":false,"pushed_at":"2026-07-05T21:45:19.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-05T23:11:25.275Z","etag":null,"topics":["extensions","lsp","lsp-server","neovim-plugin","sql","vscode-extension"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/denzyldick.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,"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":"2026-07-05T11:43:53.000Z","updated_at":"2026-07-05T21:47:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/denzyldick/polyquery","commit_stats":null,"previous_names":["denzyldick/polyquery"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/denzyldick/polyquery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denzyldick%2Fpolyquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denzyldick%2Fpolyquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denzyldick%2Fpolyquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denzyldick%2Fpolyquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denzyldick","download_url":"https://codeload.github.com/denzyldick/polyquery/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denzyldick%2Fpolyquery/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35362871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-11T02:00:05.354Z","response_time":104,"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":["extensions","lsp","lsp-server","neovim-plugin","sql","vscode-extension"],"created_at":"2026-07-11T12:30:42.921Z","updated_at":"2026-07-11T12:30:43.594Z","avatar_url":"https://github.com/denzyldick.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# polyquery\n\nAn LSP server that detects embedded SQL in 15+ programming languages, validates syntax with tree-sitter-sequel, provides schema-aware autocomplete, and can execute queries against live PostgreSQL / SQLite / MySQL databases.\n\n## Languages supported\n\nTypeScript, TSX, JavaScript, JSX, Python, Ruby, Go, Rust, Java, Kotlin, C/C++, C#, Swift, Elixir, PHP, and more.\n\nSQL is detected in tagged template literals, function calls (e.g. `db.query(\"...\")`), comment-annotated strings, and raw string literals — configurable per language.\n\n## Features\n\n- **Red squiggles**: Invalid SQL gets diagnostic underlines with error messages\n- **Schema-aware autocomplete**: Table and column names from your live database\n- **Run queries**: Code lens / command to execute the SQL and see results\n- **15+ languages**: Embedded SQL detection for virtually every major language\n- **Auto-introspection**: Schema is pulled from the database automatically (no manual definitions)\n\n## Editor setup\n\n### VS Code\n```bash\ncode editors/vscode\nnpm install\nvsce package\ncode --install-extension polyquery-*.vsix\n```\n\n### Neovim (lazy.nvim)\n```lua\n{\n  name = \"polyquery\",\n  dir = \"/path/to/polyquery/editors/neovim\",\n}\n```\n\n### Emacs\n```el\n(add-to-list 'load-path \"/path/to/polyquery/editors/emacs\")\n(require 'polyquery)\n```\n\n## Build\n\n```bash\ncargo build --release\n```\n\n## Run\n\nPolyquery is an LSP server — it communicates over stdin/stdout. Point your editor's LSP client at the `polyquery` binary.\n\nSet a database URL for schema support and query execution:\n\n```\nPOLYQUERY_DATABASE_URL=postgres://user:pass@localhost/mydb\n```\n\nYou can also set it interactively from within your editor:\n- VS Code: `Polyquery: Set Database URL` command\n- Neovim: `:PolyquerySetDatabaseUrl`\n- Emacs: `M-x polyquery-set-database-url`\n\n## Configuration\n\nOptionally create `.polyquery.toml` in your project root:\n\n```toml\n[profile.default]\ndatabase_url = \"postgres://...\"\n```\n\n## Architecture\n\n```\nEditor (LSP client)\n    ↕ LSP (stdin/stdout)\npolyquery (LSP server)\n    ├── Language detection (tree-sitter, 15+ languages)\n    ├── SQL validation (tree-sitter-sequel)\n    ├── Schema introspection (sqlx → PostgreSQL / SQLite / MySQL)\n    ├── Completion provider (keywords + schema-aware)\n    └── Query execution (sqlx, via runQuery command)\n```\n\n## Integration tests\n\n```bash\ncargo test\n```\n\nDatabase-dependent tests are marked `#[ignore]` — run them against a live DB:\n\n```bash\nPOLYQUERY_DATABASE_URL=postgres://... cargo test -- --ignored\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenzyldick%2Fpolyquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenzyldick%2Fpolyquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenzyldick%2Fpolyquery/lists"}