diff --git a/.github/workflows/lang-elixir-postgrex.yml b/.github/workflows/lang-elixir-postgrex.yml index 858f145f..7fe884d4 100644 --- a/.github/workflows/lang-elixir-postgrex.yml +++ b/.github/workflows/lang-elixir-postgrex.yml @@ -39,8 +39,14 @@ jobs: matrix: os: [ 'ubuntu-latest' ] cratedb-version: [ 'nightly' ] - otp-version: ['26', '27'] - elixir-version: ['1.17', '1.18'] + otp-version: [ + '27', + '28', + ] + elixir-version: [ + '1.18', + '1.19', + ] services: cratedb: diff --git a/by-language/elixir-postgrex/mix.exs b/by-language/elixir-postgrex/mix.exs index 6a820754..e9236f02 100644 --- a/by-language/elixir-postgrex/mix.exs +++ b/by-language/elixir-postgrex/mix.exs @@ -17,7 +17,7 @@ defmodule CrateDBExample.MixProject do defp deps() do [ {:jason, "~> 1.4"}, - {:postgrex, "~> 0.21.0"}, + {:postgrex, "~> 0.21"}, ] end diff --git a/by-language/elixir-postgrex/test/basic_test.exs b/by-language/elixir-postgrex/test/basic_test.exs index d2472df1..4a4d3434 100644 --- a/by-language/elixir-postgrex/test/basic_test.exs +++ b/by-language/elixir-postgrex/test/basic_test.exs @@ -90,9 +90,10 @@ defmodule CrateDBTest do SELECT id FROM testdrive.elixir WHERE knn_match(data, ?, 2) - ORDER BY id; - ", [[0.1, 0.2, 0.3]]) - assert [~c"*", ~c"+", ~c",", ~c"-"] == result.rows + ORDER BY VECTOR_SIMILARITY(data, ?) DESC + LIMIT 3; + ", [[0.1, 0.2, 0.3], [0.1, 0.2, 0.3]]) + assert [[42], [44], [45]] == result.rows end