private static String[] listFunctionNamesFromStorageContainer( StorageContainer container, String prefix) { // TODO: Optimize to just run a single query, or perhaps consider caching functions in // memory like we do regexes (or just make ProxyStorage better at doing this) return container .getStoredFunctions() .stream() .map((f) -> f.getName()) .filter((name) -> prefix == null || name.startsWith(prefix)) .toArray((size) -> new String[size]); }