Releases
Release notes for Resource Surveillance (surveilr
) 0.32.0
What’s New
This release introduces a rich set of text manipulation and regular expression functions capabilities into surveilr
. Usage examples can be found in the assurance test cases.
Text Functions
1. text_substring
Extracts a substring from the input string, starting from the specified index, and optionally for a given length.
Syntax:
Example:
2. text_slice
Extracts a substring from the input string starting at a given index and ending at an optional index.
Syntax:
Example:
3. text_left
Returns the first n
characters from the input string.
Syntax:
Example:
4. text_right
Returns the last n
characters from the input string.
Syntax:
Example:
5. text_index
Returns the position of the first occurrence of the substring in the input string.
Syntax:
Example:
6. text_last_index
Returns the position of the last occurrence of the substring in the input string.
Syntax:
Example:
7. text_contains
Checks if the input string contains the specified substring.
Syntax:
Example:
8. text_has_prefix
Checks if the input string starts with the specified substring.
Syntax:
Example:
9. text_has_suffix
Checks if the input string ends with the specified substring.
Syntax:
Example:
10. text_count
Counts the occurrences of the substring within the input string.
Syntax:
Example:
11. text_like
Performs case-insensitive string comparison.
Syntax:
Example:
12. text_split
Splits the input string by the specified separator and returns the n
th part.
Syntax:
Example:
13. text_concat
Concatenates multiple strings and returns the result.
Syntax:
Example:
14. text_join
Joins strings using the specified separator.
Syntax:
Example:
15. text_repeat
Repeats the input string the specified number of times.
Syntax:
Example:
16. text_ltrim
Trims characters from the beginning of the input string.
Syntax:
Example:
17. text_rtrim
Trims characters from the end of the input string.
Syntax:
Example:
18. text_trim
Trims characters from both ends of the input string.
Syntax:
Example:
19. text_lpad
Pads the input string to the specified length by prepending characters.
Syntax:
Example:
20. text_rpad
Pads the input string to the specified length by appending characters.
Syntax:
Example:
21. text_upper
Converts the input string to uppercase.
Syntax:
Example:
22. text_lower
Converts the input string to lowercase.
Syntax:
Example:
23. text_title
Converts the input string to title case.
Syntax:
Example:
24. text_replace
Replaces occurrences of a substring with another string.
Syntax:
Example:
25. text_reverse
Reverses the input string.
Syntax:
Example:
26. text_length
Returns the number of characters in the input string.
Syntax:
Example:
27. text_size
Returns the number of bytes in the input string.
Syntax:
Example:
28. text_bitsize
Returns the number of bits in the input string.
Syntax:
Example:
Regular Expression Functions
1. regexp_like
Checks if the source string matches the pattern.
Syntax:
Example:
2. regexp_substr
Returns a substring of the source string that matches the pattern.
Syntax:
Example:
3. regexp_capture
Returns the n
th matching group within a substring.
Syntax:
Example:
4. regexp_replace
Replaces all matching substrings with the replacement string.
Syntax:
Example:
Bug Fixes
1. Fixed Uniform Resource Table Query Bug
- Issue: There was no clear way to query and retrieve the latest file content from the
uniform_resource
table, especially after reverting a file to a previous state. Additionally, theupdated_at
field remained empty for all entries, making it difficult to track file version updates. - Fix: The bug was fixed by adding the
updated_at
andlast_modified_at
field in theON CONFLICT
query part, ensuring proper tracking of file version updates.
Assets
Please find the release here.