{"uid":"cap_RggOPPCVqjUq1xfR3h4No","slug":"apiacre-com-sql-change-review-ae67cf0e","name":"apiacre.com SQL Change Review","description":"Statically parse caller-supplied SQL without a database connection or execution, inventory statements and tables, and flag destructive DDL, unfiltered writes, and migration atomicity concerns.","url":"https://apiacre.com/v1/developer/sql-change-review?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"sql":{"type":"string"},"dialect":{"enum":["postgres","mysql","sqlite","tsql","bigquery","snowflake","duckdb","spark","oracle","redshift"],"type":"string"}}},"responseSchema":{"type":"json","example":{"data":{"valid":true,"parser":{"name":"SQLGlot","license":"MIT","version":"30.16.0"},"dialect":"postgres","summary":{"readStatements":0,"otherStatements":0,"dataChangeStatements":0,"transactionStatements":0,"schemaChangeStatements":1},"findings":[],"execution":{"sqlExecuted":false,"databaseConnected":false},"statements":[{"index":1,"category":"schema-change","readOnly":false,"operation":"CREATE","targetObjects":["accounts"]}],"limitations":["Static syntax review only; database schema, permissions, triggers, data volum...","A low attention score does not prove a change is correct or safe to deploy."],"attentionLevel":"clear","attentionScore":0,"documentSha256":"3e31b98c852573137d17dcb062b2a1571d63052f71abeeb8b62296f3d1066af4","reviewDecision":"clear","statementCount":1},"meta":{"cached":false,"sources":[],"warnings":[],"duration_ms":42,"next_actions":[]},"service":"developer.sql-change-review","version":"1","request_id":"018f1f54-7f38-7ba2-8dc3-5f90272d9f1a"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.05","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_UjZ395kntsYX5F8BnN7yw","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Statically analyzes caller-supplied SQL statements without executing them, inventorying tables and operations while flagging destructive DDL, unfiltered writes, and migration atomicity risks.","exampleAgentPrompt":"Can you statically review this SQL migration script for me — flag any destructive DDL like DROP or TRUNCATE, unfiltered UPDATE or DELETE statements, and any atomicity concerns, without actually running it against a database?","exampleUseCases":[{"title":"Pre-deploy migration safety check","prompt":"Before we deploy this migration to production, can you parse this SQL script and tell me if there are any DROP TABLE statements, unfiltered DELETEs, or transactions that aren't wrapped properly for atomicity?"},{"title":"Code review automation for schema changes","prompt":"I'm reviewing a pull request that includes a SQL schema change. Can you analyze this ALTER TABLE and DROP COLUMN script to flag any destructive DDL or missing rollback concerns I should block it on?"},{"title":"CI pipeline SQL linting","prompt":"We want to catch dangerous SQL in our CI pipeline — can you analyze this migration file and return a machine-readable list of all tables touched, statement types used, and any risky operations like unguarded UPDATE or TRUNCATE?"}],"resultDescription":"Returns a structured report including an inventory of parsed SQL statements and affected tables, flags for destructive DDL operations (e.g. DROP, TRUNCATE), warnings about unfiltered writes (UPDATE or DELETE without WHERE clauses), and atomicity concerns in migration scripts — all without executing the SQL against any database.","failureModes":["Malformed or unparseable SQL returns a parse error with position details","Extremely large or complex SQL scripts may exceed input size limits","Dialect-specific syntax unsupported by the static parser may produce incomplete analysis","Ambiguous or dynamic SQL (e.g. using variables) may not be fully analyzable statically"],"whenToPreferThis":"Choose this endpoint when you need a safe, zero-side-effect pre-flight check on SQL before execution — especially for migration scripts, CI/CD pipelines, or code review automation. It is ideal when you cannot or should not connect to a live database, and you want structured, machine-readable risk flags rather than a human-written opinion. Prefer it over running EXPLAIN or database-native checks when isolation from the database is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-09T18:46:56.011Z","isFirstParty":false,"canonicalSlug":"apiacre-com-sql-change-review-ae67cf0e"}