Commit f283cbc
feat(azure): add SQLDatabaseSchema adapter (#4415)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
## Summary
Create Azure adapter for SQL Database Schemas (child resource of SQL
Server → SQL Database).
## Changes
- **Client interface**
(`sources/azure/clients/sql-database-schemas-client.go`): Wraps Azure
SDK `DatabaseSchemasClient` with `Get` and `ListByDatabase` methods
- **Adapter implementation**
(`sources/azure/manual/sql-database-schema.go`): SearchableWrapper with
3-level composite key (serverName, databaseName, schemaName)
- **Registration** (`sources/azure/manual/adapters.go`): Register
adapter in both active and placeholder blocks
- **Unit tests** (`sources/azure/manual/sql-database-schema_test.go`):
Comprehensive test coverage including edge cases
- **Integration test**
(`sources/azure/integration-tests/sql-database-schema_test.go`): Tests
against live Azure APIs
## Architecture
- **Parent chain**: SQL Server → SQL Database → Database Schema
- **Wrapper type**: SearchableWrapper (deeply nested, 3 path params
after resourceGroup)
- **`Get`** requires: serverName, databaseName, schemaName
- **`Search`** requires: serverName, databaseName (lists all schemas
under that database)
- **Links back** to parent SQLDatabase resource via composite key
The parent adapter `sql-database.go` already has a SEARCH link to
SQLDatabaseSchema (added in a prior PR).
## Self-Review Checklist
- [x] **IAMPermissions**: Present, references
`Microsoft.Sql/servers/databases/schemas/read`
- [x] **PredefinedRole**: Present, uses `Reader`
- [x] **LinkedItemQueries**: 1 link verified (parent SQLDatabase via
GET)
- [x] **PotentialLinks**: 1 type listed (SQLDatabase), matches
LinkedItemQueries
- [x] **Unit tests**: All passing (Get, Search, SearchStream,
StaticTests, ErrorHandling, edge cases)
- [x] **Integration test**: All sub-tests passing (Setup, Run, Teardown)
against live Azure APIs
All checklist items passed. Ready for review.
Closes: ENG-3372
<!-- CURSOR_AGENT_PR_BODY_END -->
Linear Issue:
[ENG-3372](https://linear.app/overmind/issue/ENG-3372/create-azure-adapter-sqldatabaseschema)
<div><a
href="https://cursor.com/agents/bc-8bd525e4-23d3-4eed-8410-68336a47f8b6"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a> <a
href="https://cursor.com/background-agent?bcId=bc-8bd525e4-23d3-4eed-8410-68336a47f8b6"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a> </div>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Lionel Wilson <Lionel-Wilson@users.noreply.github.com>
GitOrigin-RevId: a2944706e235d4e386a3c9ba5412ed938d0fce251 parent adb4fdd commit f283cbc
6 files changed
Lines changed: 1305 additions & 0 deletions
File tree
- sources/azure
- clients
- integration-tests
- manual
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments