@@ -22,6 +22,7 @@ describe('#integration vector type', () => {
2222 let driverGlobal
2323 let protocolVersion
2424 const uri = `bolt://${ sharedNeo4j . hostnameWithBoltPort } `
25+ let edition
2526
2627 beforeAll ( async ( ) => {
2728 driverGlobal = neo4j . driver ( uri , sharedNeo4j . authToken )
@@ -30,6 +31,7 @@ describe('#integration vector type', () => {
3031 sharedNeo4j . authToken
3132 )
3233 protocolVersion = await sharedNeo4j . cleanupAndGetProtocolVersion ( tmpDriver )
34+ edition = await sharedNeo4j . getEdition ( driverGlobal )
3335 await tmpDriver . close ( )
3436 } )
3537
@@ -45,13 +47,13 @@ describe('#integration vector type', () => {
4547 } )
4648
4749 it ( 'write and read vectors' , async ( ) => {
48- if ( protocolVersion >= 6.0 ) {
50+ if ( protocolVersion >= 6.0 && edition === 'enterprise' ) {
4951 const driver = driverGlobal
5052
5153 const bufferWriter = Uint8Array . from ( [ 1 , 1 ] )
5254 await driver . executeQuery ( 'CREATE (p:Product) SET p.vector_from_array = $vector_from_array, p.vector_from_buffer = $vector_from_buffer' , {
5355 vector_from_array : neo4j . vector ( Float32Array . from ( [ 1 , 2 , 3 , 4 ] ) ) , // Typed arrays can be created from a regular list of Numbers
54- vector_from_buffer : neo4j . vector ( new Uint8Array ( bufferWriter . buffer ) ) // Or from a bytebuffer
56+ vector_from_buffer : neo4j . vector ( new Int8Array ( bufferWriter . buffer ) ) // Or from a bytebuffer
5557 } )
5658 const res = await driver . executeQuery ( 'MATCH (p:Product) RETURN p.vector_from_array as arrayVector, p.vector_from_buffer as bufferVector' )
5759
0 commit comments