# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
<!-- generated by git-cliff -->

## [Unreleased]

### Changed

- **BREAKING:** Command templates are now [Handlebars](https://handlebarsjs.com/)
  templates that conform to the Drasi Reaction Plugin Developer Guide (§11 Output
  Templating), replacing the previous bespoke `@field` / `EXEC proc(@a, @b)`
  substitution syntax. Row values are bound as positional SQL parameters with the
  `{{param <path>}}` helper (e.g. `EXEC add_user {{param after.id}}, {{param after.name}}`),
  and objects can be serialized with `{{json <path>}}`. Templates render in strict
  mode: a reference to a field absent from the current row fails to render and the
  event is skipped rather than executed with missing data.
- **BREAKING:** `MsSqlStoredProcReactionConfig::validate` now takes the reaction's
  subscribed query ids (`&[String]`) so that route keys are validated against the
  subscribed queries and every template is compiled at construction time.
- **BREAKING:** `executor::execute_procedure` was renamed to
  `executor::execute_command` and now executes a fully-rendered SQL command with an
  ordered vector of bound parameters.
- **BREAKING:** Removed the public `parser` module and its `@field` parser; rendering
  now lives in the internal `render` module.

### Fixed

- Row values are always bound through the driver as positional parameters
  (`@P1`, `@P2`, …) instead of being interpolated into the SQL text, eliminating a
  SQL-injection / value-corruption risk and preserving values verbatim (including
  strings containing quotes and semicolons).
- Integer values are bound consistently as `BIGINT` rather than being narrowed to
  32 bits, preventing silent truncation of large integers. Unsigned integers that
  exceed `i64::MAX` (which `BIGINT` cannot represent) are bound as their exact
  decimal string instead of being coerced to `FLOAT`, preserving integer
  precision for large `u64` row fields.
- Corrected the tiberius parameter placeholders to the driver's uppercase
  `@P{n}` form (previously lowercase `@p{n}`, which was never exercised end-to-end).
- The `{{json}}` helper now rejects a field that is absent from the current row
  instead of serializing it to the string `"null"`, which would otherwise be
  interpolated into the SQL text (`{{json missing}}`) or bound as the literal
  string `"null"` (`{{param (json missing)}}`). Both now fail the render and skip
  the event, matching the `{{param}}` helper's strict-mode contract.

### Added

- **TLS backend Cargo features** (`native-tls`, `rustls`), with `native-tls`
  enabled by default. A TLS backend is required to connect to SQL Server with
  `ssl = true`; previously the crate depended on `tiberius` with
  `default-features = false` and **no** TLS backend, so it could only establish an
  encrypted connection when built inside the workspace alongside another crate
  (e.g. the MSSQL source) that happened to enable tiberius's TLS backend through
  Cargo feature unification. A standalone consumer of only this reaction could not
  connect over TLS. Build with `--no-default-features --features rustls` to use
  rustls instead of the platform TLS stack (e.g. on macOS, whose Secure Transport
  stack rejects the SQL Server 2022 handshake).
- `with_added_command`, `with_updated_command`, and `with_deleted_command` builder
  setters for configuring per-operation command templates directly.
- End-to-end integration tests that drive the reaction against a real SQL Server
  container (build → start → enqueue → assert → stop), including a regression test
  proving special characters in row values are bound safely.

<!-- generated by git-cliff -->

## [0.3.4] - 2026-07-08

### Miscellaneous Tasks

- Updated the following local packages: drasi-lib

<!-- generated by git-cliff -->

## [0.3.3] - 2026-06-18

### Miscellaneous Tasks

- Updated the following local packages: drasi-lib, drasi-plugin-sdk

<!-- generated by git-cliff -->

## [0.3.2] - 2026-05-21

### Features

- Secret store plugin system with file, keyring, and Azure Key Vault providers ([#460](https://github.com/drasi-project/drasi-core/issues/460))

### Miscellaneous Tasks

- Normalize Apache-2.0 license headers across all .rs files ([#462](https://github.com/drasi-project/drasi-core/issues/462))

<!-- generated by git-cliff -->

## [0.3.1] - 2026-05-20

### Miscellaneous Tasks

- Updated the following local packages: drasi-lib, drasi-plugin-sdk

<!-- generated by git-cliff -->

## [0.3.0] - 2026-05-12

### Bug Fixes

- Lossless config persistence — preserve ConfigValue envelopes, camelCase keys, and passwords ([#422](https://github.com/drasi-project/drasi-core/issues/422))

### Miscellaneous Tasks

- Release ([#446](https://github.com/drasi-project/drasi-core/issues/446))

<!-- generated by git-cliff -->

## [0.2.14] - 2026-05-11

### Bug Fixes

- Lossless config persistence — preserve ConfigValue envelopes, camelCase keys, and passwords ([#422](https://github.com/drasi-project/drasi-core/issues/422))

<!-- generated by git-cliff -->

## [0.2.13] - 2026-04-28

### Miscellaneous Tasks

- Updated the following local packages: drasi-plugin-sdk

<!-- generated by git-cliff -->

## [0.2.12] - 2026-04-27

### Miscellaneous Tasks

- Updated the following local packages: drasi-plugin-sdk, drasi-lib

<!-- generated by git-cliff -->

## [0.2.10] - 2026-04-23

### BUG

- Aggregating results missing in reactions ([#322](https://github.com/drasi-project/drasi-core/issues/322))

### Bug Fixes

- Upgrade dependencies to resolve cargo-audit security vulnerabilities ([#331](https://github.com/drasi-project/drasi-core/issues/331))

<!-- generated by git-cliff -->

## [0.2.8] - 2026-03-16

### Miscellaneous Tasks

- Updated the following local packages: drasi-lib, drasi-plugin-sdk

<!-- generated by git-cliff -->
## [0.2.7] - 2026-03-09

### Miscellaneous Tasks

- Updated the following local packages: drasi-plugin-sdk

<!-- generated by git-cliff -->
<!-- generated by git-cliff -->
## [0.2.5] - 2026-02-13

### Miscellaneous Tasks

- Updated the following local packages: drasi-lib

<!-- generated by git-cliff -->
## [0.2.4] - 2026-02-11

### Miscellaneous Tasks

- Updated the following local packages: drasi-lib

<!-- generated by git-cliff -->
## [0.2.3] - 2026-02-10

### Miscellaneous Tasks

- Updated the following local packages: drasi-lib

<!-- generated by git-cliff -->
## [0.2.2] - 2026-02-05

### Miscellaneous Tasks

- Updated the following local packages: drasi-lib

<!-- generated by git-cliff -->
<!-- generated by git-cliff -->
