@@ -171,7 +171,7 @@ describe('#integration session', () => {
171171 it ( 'should accept a statement object ' , done => {
172172 // Given
173173 const statement = {
174- text : 'RETURN 1 = { param} AS a' ,
174+ text : 'RETURN 1 = $ param AS a' ,
175175 parameters : { param : 1 }
176176 }
177177
@@ -215,7 +215,7 @@ describe('#integration session', () => {
215215
216216 it ( 'should expose summarize method for basic metadata ' , done => {
217217 // Given
218- const statement = 'CREATE (n:Label {prop:{ prop} }) RETURN n'
218+ const statement = 'CREATE (n:Label {prop: $ prop}) RETURN n'
219219 const params = { prop : 'string' }
220220 // When & Then
221221 session . run ( statement , params ) . then ( result => {
@@ -269,7 +269,7 @@ describe('#integration session', () => {
269269
270270 it ( 'should expose plan ' , done => {
271271 // Given
272- const statement = 'EXPLAIN CREATE (n:Label {prop:{ prop} }) RETURN n'
272+ const statement = 'EXPLAIN CREATE (n:Label {prop: $ prop}) RETURN n'
273273 const params = { prop : 'string' }
274274 // When & Then
275275 session . run ( statement , params ) . then ( result => {
@@ -286,7 +286,7 @@ describe('#integration session', () => {
286286
287287 it ( 'should expose profile ' , done => {
288288 // Given
289- const statement = 'PROFILE MATCH (n:Label {prop:{ prop} }) RETURN n'
289+ const statement = 'PROFILE MATCH (n:Label {prop: $ prop}) RETURN n'
290290 const params = { prop : 'string' }
291291 // When & Then
292292 session . run ( statement , params ) . then ( result => {
@@ -403,7 +403,7 @@ describe('#integration session', () => {
403403 throw Error ( )
404404 }
405405
406- const statement = 'RETURN { param} '
406+ const statement = 'RETURN $ param'
407407 const params = { param : unpackable }
408408 // When & Then
409409 session . run ( statement , params ) . catch ( ignore => {
@@ -883,20 +883,20 @@ describe('#integration session', () => {
883883 it ( 'should be able to do nested queries' , done => {
884884 session
885885 . run (
886- 'CREATE (knight:Person:Knight {name: { name1} , castle: { castle} })' +
887- 'CREATE (king:Person {name: { name2} , title: { title} })' ,
886+ 'CREATE (knight:Person:Knight {name: $ name1, castle: $ castle})' +
887+ 'CREATE (king:Person {name: $ name2, title: $ title})' ,
888888 { name1 : 'Lancelot' , castle : 'Camelot' , name2 : 'Arthur' , title : 'King' }
889889 )
890890 . then ( ( ) => {
891891 session
892892 . run (
893- 'MATCH (knight:Person:Knight) WHERE knight.castle = { castle} RETURN id(knight) AS knight_id' ,
893+ 'MATCH (knight:Person:Knight) WHERE knight.castle = $ castle RETURN id(knight) AS knight_id' ,
894894 { castle : 'Camelot' }
895895 )
896896 . subscribe ( {
897897 onNext : record => {
898898 session . run (
899- 'MATCH (knight) WHERE id(knight) = {id} MATCH (king:Person) WHERE king.name = { king} CREATE (knight)-[:DEFENDS]->(king)' ,
899+ 'MATCH (knight) WHERE id(knight) = $id MATCH (king:Person) WHERE king.name = $ king CREATE (knight)-[:DEFENDS]->(king)' ,
900900 { id : record . get ( 'knight_id' ) , king : 'Arthur' }
901901 )
902902 } ,
0 commit comments