Skip to content

Commit

Permalink
Test multi_insert
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Jun 3, 2023
1 parent 48e140e commit 6837cb5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/sequel_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ def setup

def test_works
items.insert(embedding: "[1,1,1]")
items.insert(embedding: "[2,2,2]")
items.insert(embedding: "[1,1,2]")
items.multi_insert([{embedding: "[2,2,2]"}, {embedding: "[1,1,2]"}])
results = items.order(Sequel.lit("embedding <-> ?", "[1,1,1]")).limit(5).all
assert_equal [1, 3, 2], results.map { |r| r[:id] }
end
Expand Down

0 comments on commit 6837cb5

Please sign in to comment.