MCPcopy Index your code
hub / github.com/simstudioai/sim / buildDeleteQuery

Function buildDeleteQuery

apps/sim/app/api/tools/mysql/utils.ts:106–113  ·  view source on GitHub ↗
(table: string, where: string)

Source from the content-addressed store, hash-verified

104}
105
106export function buildDeleteQuery(table: string, where: string) {
107 validateWhereClause(where)
108
109 const sanitizedTable = sanitizeIdentifier(table)
110 const query = `DELETE FROM ${sanitizedTable} WHERE ${where}`
111
112 return { query, values: [] }
113}
114
115/**
116 * Validates a WHERE clause to prevent SQL injection attacks

Callers 1

route.tsFile · 0.90

Calls 2

validateWhereClauseFunction · 0.70
sanitizeIdentifierFunction · 0.70

Tested by

no test coverage detected