Last active
August 19, 2021 18:06
-
-
Save mvodep/909cc643f09bbf018c131904cb8f8435 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION some_function(some_ids UUID[]) | |
RETURNS TABLE (id INTEGER) | |
LANGUAGE SQL | |
AS $$ | |
-- ERROR: function some_function(record[]) does not exist | |
CREATE OR REPLACE FUNCTION some_function(VARIADIC some_ids UUID[]) | |
RETURNS TABLE (id INTEGER) | |
LANGUAGE SQL | |
AS $$ | |
// Doesnt work: | |
@Query(nativeQuery = true, value = "SELECT some_function(ARRAY[:uuids])") | |
LinkedHashSet<Integer> getSomeFunction(Collection<UUID> uuids); | |
// Works with VARIADIC | |
@Query(nativeQuery = true, value = "SELECT some_function(:uuids)") | |
LinkedHashSet<Integer> getSomeFunction(Collection<UUID> uuids); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment