@@ -7,7 +7,7 @@ Note: This is in active development, the API is not stable. Please try it out an
7
7
## Include module in Node.js application
8
8
9
9
``` javascript
10
- var neo4j = require (' neo4j' );
10
+ var neo4j = require (' neo4j' ). v1 ;
11
11
```
12
12
13
13
## Include in web browser
@@ -71,37 +71,37 @@ session.run(statement.join(' '), params)
71
71
72
72
## Building
73
73
74
- npm install
74
+ npm install
75
75
npm build
76
76
77
- This produces browser-compatible standalone files under ` lib/browser ` and a Node.js module version under ` lib/ ` .
77
+ This produces browser-compatible standalone files under ` lib/browser ` and a Node.js module version under ` lib/ ` .
78
78
See files under ` examples/ ` on how to use.
79
79
80
80
## Testing
81
81
82
82
./runTests.sh
83
83
84
- This runs the test suite against a fresh download of Neo4j.
84
+ This runs the test suite against a fresh download of Neo4j.
85
85
Or ` npm test ` if you already have a running version of a compatible Neo4j server.
86
86
87
87
### Testing on windows
88
- Running tests on windows requires PhantomJS installed and its bin folder added in windows system variable ` Path ` .
89
- To run the same test suite, run ` .\runTest.ps1 ` instead in powershell with admin right.
90
- The admin right is required to start/stop Neo4j properly as a system service.
88
+ Running tests on windows requires PhantomJS installed and its bin folder added in windows system variable ` Path ` .
89
+ To run the same test suite, run ` .\runTest.ps1 ` instead in powershell with admin right.
90
+ The admin right is required to start/stop Neo4j properly as a system service.
91
91
While there is no need to grab admin right if you are running tests against an existing Neo4j server using ` npm test ` .
92
92
93
93
## A note on numbers and the Integer type
94
- For this driver to fully map to the Neo4j type system handling of 64-bits Integers is needed.
95
- Javascript can saftely represent numbers between ` -(2 ` <sup >` 53 ` </sup >` - 1) ` and ` (2 ` <sup >` 53 ` </sup >` - 1) ` .
96
- Therefore, an Integer type is introduced.
94
+ For this driver to fully map to the Neo4j type system handling of 64-bits Integers is needed.
95
+ Javascript can saftely represent numbers between ` -(2 ` <sup >` 53 ` </sup >` - 1) ` and ` (2 ` <sup >` 53 ` </sup >` - 1) ` .
96
+ Therefore, an Integer type is introduced.
97
97
98
98
### Write integers
99
- Number written directly e.g. ` session.run("CREATE (n:Node {age: {age}})", {age: 22}) ` will be of type ` Float ` in Neo4j.
100
- To write the ` age ` as an integer the ` neo4j.int ` method should be used.
99
+ Number written directly e.g. ` session.run("CREATE (n:Node {age: {age}})", {age: 22}) ` will be of type ` Float ` in Neo4j.
100
+ To write the ` age ` as an integer the ` neo4j.int ` method should be used.
101
101
E.g. ` session.run("CREATE (n:Node {age: {age}})", {age: neo4j.int(22)}) ` .
102
102
103
103
### Read integers
104
- To get the value of a from Neo4j received integer, the safeast way would be to use the ` .toString() ` method on
105
- an Integer object.
106
- E.g. ` console.log(result.age.toString()) ` .
104
+ To get the value of a from Neo4j received integer, the safeast way would be to use the ` .toString() ` method on
105
+ an Integer object.
106
+ E.g. ` console.log(result.age.toString()) ` .
107
107
To check if a variable is of the Integer type, the method ` neo4j.isInt(variable) ` can be used.
0 commit comments