Security
Basic Usage
Use the@db annotation to specify a database connection and a >>>db block for queries and assertions:
Connection Strings
Specify the database connection using the@db annotation:
Query and Assert Syntax
Inside a>>>db block, use query to run SQL and expect to assert on the result columns:
Supported Operators
If you omit the operator, hitspec defaults to
== (exact match). So
expect active true is equivalent to expect active == true.Examples
Verify Record Creation
Verify Record Deletion
Verify Aggregates
Variable interpolation works inside
>>>db blocks. You can use captured values, environment variables, and built-in functions in your SQL queries.