From 0b7b16d08a241b8226aa8955647bf2dd7f268ba8 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 15 Jan 2025 21:03:48 -0800 Subject: [PATCH] Improved formatting [skip ci] --- ent_test.go | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/ent_test.go b/ent_test.go index 3931c08..6e302dd 100644 --- a/ent_test.go +++ b/ent_test.go @@ -39,14 +39,26 @@ func TestEnt(t *testing.T) { halfEmbedding := pgvector.NewHalfVector([]float32{1, 1, 1}) binaryEmbedding := "000" sparseEmbedding := pgvector.NewSparseVector([]float32{1, 1, 1}) - _, err = client.Item.Create().SetEmbedding(embedding).SetHalfEmbedding(halfEmbedding).SetBinaryEmbedding(binaryEmbedding).SetSparseEmbedding(sparseEmbedding).Save(ctx) + _, err = client.Item.Create(). + SetEmbedding(embedding). + SetHalfEmbedding(halfEmbedding). + SetBinaryEmbedding(binaryEmbedding). + SetSparseEmbedding(sparseEmbedding).Save(ctx) if err != nil { panic(err) } _, err = client.Item.CreateBulk( - client.Item.Create().SetEmbedding(pgvector.NewVector([]float32{2, 2, 2})).SetHalfEmbedding(pgvector.NewHalfVector([]float32{2, 2, 2})).SetBinaryEmbedding("101").SetSparseEmbedding(pgvector.NewSparseVector([]float32{2, 2, 2})), - client.Item.Create().SetEmbedding(pgvector.NewVector([]float32{1, 1, 2})).SetHalfEmbedding(pgvector.NewHalfVector([]float32{1, 1, 2})).SetBinaryEmbedding("111").SetSparseEmbedding(pgvector.NewSparseVector([]float32{1, 1, 2})), + client.Item.Create(). + SetEmbedding(pgvector.NewVector([]float32{2, 2, 2})). + SetHalfEmbedding(pgvector.NewHalfVector([]float32{2, 2, 2})). + SetBinaryEmbedding("101"). + SetSparseEmbedding(pgvector.NewSparseVector([]float32{2, 2, 2})), + client.Item.Create(). + SetEmbedding(pgvector.NewVector([]float32{1, 1, 2})). + SetHalfEmbedding(pgvector.NewHalfVector([]float32{1, 1, 2})). + SetBinaryEmbedding("111"). + SetSparseEmbedding(pgvector.NewSparseVector([]float32{1, 1, 2})), ).Save(ctx) if err != nil { panic(err)