Skip to content

Releases

Release notes for Resource Surveillance (surveilr) 0.24.0

What’s New


1. New SQLite Functions: eval and define

  • eval Function: The eval function allows you to execute a SQL statement dynamically and return the result as a string. This is particularly useful for generating and executing SQL on the fly, such as when constructing complex queries programmatically.

    Example Usage:

    The following example uses eval to dynamically generate a CREATE UNIQUE INDEX statement based on the columns of a table:

    SELECT eval(
    WITH columns_cte AS (
    SELECT name AS column_name
    FROM pragma_table_info('xyz_csv')
    )
    SELECT 'CREATE UNIQUE INDEX unique_xyz_csv ON xyz_csv(' ||
    GROUP_CONCAT(column_name, ', ') ||
    ');' AS create_index_sql
    FROM columns_cte
    );

    In this example, the eval function generates a SQL statement that creates a unique index for all columns of the table xyz_csv, then executes the statement.

  • define Function: The define function allows you to register custom SQL functions in SQLite. You provide a function name and its definition, and this function is then available for use in future queries.


Bug Fixes

1. Orchestration Functions Now Available in surveilr shell

  • Fixed an issue where orchestration-related functions were not accessible within the surveilr shell command. These functions are now available and can be used without restrictions.

2. Extensive Logging Mode Added to surveilr shell

  • Introduced an extensive logging mode in surveilr shell. This mode provides detailed logs of operations, similar to orchestration.

Assets

Please find the release here.