Skip to content

Commit a63405b

Browse files
authored
Merge pull request #341 from lutovich/1.6-temporal
Support for temporal types
2 parents 3fc67a6 + 7b49fbe commit a63405b

12 files changed

+1744
-26
lines changed

src/v1/index.js

+60-5
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,23 @@ import VERSION from '../version';
2929
import {assertString, isEmptyObjectOrNull} from './internal/util';
3030
import urlUtil from './internal/url-util';
3131
import HttpDriver from './internal/http/http-driver';
32-
import {Point} from './spatial-types';
32+
import {isPoint, Point} from './spatial-types';
33+
import {
34+
Date,
35+
DateTimeWithZoneId,
36+
DateTimeWithZoneOffset,
37+
Duration,
38+
isDate,
39+
isDateTimeWithZoneId,
40+
isDateTimeWithZoneOffset,
41+
isDuration,
42+
isLocalDateTime,
43+
isLocalTime,
44+
isTime,
45+
LocalDateTime,
46+
LocalTime,
47+
Time
48+
} from './temporal-types';
3349

3450
/**
3551
* @property {function(username: string, password: string, realm: ?string)} basic the function to create a
@@ -196,7 +212,7 @@ function driver(url, authToken, config = {}) {
196212
}
197213

198214
/**
199-
* Object containing constructors for all graph types.
215+
* Object containing constructors for all neo4j types.
200216
*/
201217
const types = {
202218
Node,
@@ -207,7 +223,14 @@ const types = {
207223
Result,
208224
ResultSummary,
209225
Record,
210-
Point
226+
Point,
227+
Date,
228+
DateTimeWithZoneId,
229+
DateTimeWithZoneOffset,
230+
Duration,
231+
LocalDateTime,
232+
LocalTime,
233+
Time
211234
};
212235

213236
/**
@@ -248,7 +271,23 @@ const forExport = {
248271
auth,
249272
types,
250273
session,
251-
error
274+
error,
275+
Point,
276+
isPoint,
277+
Date,
278+
DateTimeWithZoneId,
279+
DateTimeWithZoneOffset,
280+
Duration,
281+
LocalDateTime,
282+
LocalTime,
283+
Time,
284+
isDuration,
285+
isLocalTime,
286+
isTime,
287+
isDate,
288+
isLocalDateTime,
289+
isDateTimeWithZoneOffset,
290+
isDateTimeWithZoneId
252291
};
253292

254293
export {
@@ -260,6 +299,22 @@ export {
260299
auth,
261300
types,
262301
session,
263-
error
302+
error,
303+
Point,
304+
isPoint,
305+
Date,
306+
DateTimeWithZoneId,
307+
DateTimeWithZoneOffset,
308+
Duration,
309+
LocalDateTime,
310+
LocalTime,
311+
Time,
312+
isDuration,
313+
isLocalTime,
314+
isTime,
315+
isDate,
316+
isLocalDateTime,
317+
isDateTimeWithZoneOffset,
318+
isDateTimeWithZoneId
264319
};
265320
export default forExport;

src/v1/integer.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,9 @@ class Integer {
238238
* @returns {boolean}
239239
* @expose
240240
*/
241-
notEquals(other) { !this.equals(/* validates */ other); }
241+
notEquals(other) {
242+
return !this.equals(/* validates */ other);
243+
}
242244

243245
/**
244246
* Tests if this Integer's value is less than the specified's.

0 commit comments

Comments
 (0)