[DSL] 7.2 Parameter binding
staleArea: HelpersCategory: Enhancement
**Size:** M
**Description:**
Implement secure parameter binding for injection prevention.
**Implementation:**
```typescript
// Placeholder support
const query = ESQL
.from('employees')
.where(E('name').eq(E('?'))) // Placeholder
await client.esql.query({
query,
params: [userInput] // Safe binding
})
// Named parameters
.where(E('name').eq(E(':name')))
// params: { name: userInput }
```
**Acceptance:**
- [ ] `?` positional placeholders work
- [ ] `:name` named placeholders work
- [ ] Params passed separately to ES
- [ ] Injection attempts are safe
- [ ] Unit tests for security cases
1 条评论