@@ -32,6 +32,7 @@ public function testTypes()
3232
3333 Type::addType ('vector ' , 'Pgvector\Doctrine\VectorType ' );
3434 Type::addType ('halfvec ' , 'Pgvector\Doctrine\HalfVectorType ' );
35+ Type::addType ('bit ' , 'Pgvector\Doctrine\BitType ' );
3536 Type::addType ('sparsevec ' , 'Pgvector\Doctrine\SparseVectorType ' );
3637
3738 $ platform = $ entityManager ->getConnection ()->getDatabasePlatform ();
@@ -52,6 +53,7 @@ public function testTypes()
5253 $ item = new DoctrineItem ();
5354 $ item ->setEmbedding (new Vector ([1 , 2 , 3 ]));
5455 $ item ->setHalfEmbedding (new HalfVector ([4 , 5 , 6 ]));
56+ $ item ->setBinaryEmbedding ('101 ' );
5557 $ item ->setSparseEmbedding (new SparseVector ([7 , 8 , 9 ]));
5658 $ entityManager ->persist ($ item );
5759 $ entityManager ->flush ();
@@ -60,6 +62,7 @@ public function testTypes()
6062 $ item = $ itemRepository ->find (1 );
6163 $ this ->assertEquals ([1 , 2 , 3 ], $ item ->getEmbedding ()->toArray ());
6264 $ this ->assertEquals ([4 , 5 , 6 ], $ item ->getHalfEmbedding ()->toArray ());
65+ $ this ->assertEquals ('101 ' , $ item ->getBinaryEmbedding ());
6366 $ this ->assertEquals ([7 , 8 , 9 ], $ item ->getSparseEmbedding ()->toArray ());
6467 }
6568}
0 commit comments