Skip to content

Support for temporal types #341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Apr 3, 2018
65 changes: 60 additions & 5 deletions src/v1/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,23 @@ import VERSION from '../version';
import {assertString, isEmptyObjectOrNull} from './internal/util';
import urlUtil from './internal/url-util';
import HttpDriver from './internal/http/http-driver';
import {Point} from './spatial-types';
import {isPoint, Point} from './spatial-types';
import {
Date,
DateTimeWithZoneId,
DateTimeWithZoneOffset,
Duration,
isDate,
isDateTimeWithZoneId,
isDateTimeWithZoneOffset,
isDuration,
isLocalDateTime,
isLocalTime,
isTime,
LocalDateTime,
LocalTime,
Time
} from './temporal-types';

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

/**
* Object containing constructors for all graph types.
* Object containing constructors for all neo4j types.
*/
const types = {
Node,
Expand All @@ -207,7 +223,14 @@ const types = {
Result,
ResultSummary,
Record,
Point
Point,
Date,
DateTimeWithZoneId,
DateTimeWithZoneOffset,
Duration,
LocalDateTime,
LocalTime,
Time
};

/**
Expand Down Expand Up @@ -248,7 +271,23 @@ const forExport = {
auth,
types,
session,
error
error,
Point,
isPoint,
Date,
DateTimeWithZoneId,
DateTimeWithZoneOffset,
Duration,
LocalDateTime,
LocalTime,
Time,
isDuration,
isLocalTime,
isTime,
isDate,
isLocalDateTime,
isDateTimeWithZoneOffset,
isDateTimeWithZoneId
};

export {
Expand All @@ -260,6 +299,22 @@ export {
auth,
types,
session,
error
error,
Point,
isPoint,
Date,
DateTimeWithZoneId,
DateTimeWithZoneOffset,
Duration,
LocalDateTime,
LocalTime,
Time,
isDuration,
isLocalTime,
isTime,
isDate,
isLocalDateTime,
isDateTimeWithZoneOffset,
isDateTimeWithZoneId
};
export default forExport;
4 changes: 3 additions & 1 deletion src/v1/integer.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ class Integer {
* @returns {boolean}
* @expose
*/
notEquals(other) { !this.equals(/* validates */ other); }
notEquals(other) {
return !this.equals(/* validates */ other);
}

/**
* Tests if this Integer's value is less than the specified's.
Expand Down
Loading