Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/java-shell/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testImplementation group: 'junit', name: 'junit', version: '4.12'
implementation group: 'org.graalvm.js', name: 'js', version: '22.0.0.2'
implementation group: 'org.mongodb', name: 'mongodb-driver-sync', version: '4.5.1'
implementation group: 'org.mongodb', name: 'mongodb-driver-sync', version: '4.7.1'
implementation group: 'org.apache.commons', name: 'commons-text', version: '1.8'
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
com.mongodb.MongoQueryException: Query failed with error code 2 and error message 'error processing query: ns=admin.collTree: $and
com.mongodb.MongoQueryException: Query failed with error code 2 with name 'BadValue' and error message 'error processing query: ns=admin.collTree: $and
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
com.mongodb.MongoCommandException: Command failed with error 40415 (Location40415): 'BSON field 'create.expireAfterSeconds' is an unknown field.' on server %mongohostport%. The full response is {"ok": 0.0, "errmsg": "BSON field 'create.expireAfterSeconds' is an unknown field.", "code": 40415, "codeName": "Location40415"}
{ "acknowledged": true, "insertedId": <ObjectID> }
{ "timestamp": {"$date": {"$numberLong": "1621296000000"}} }
{ "timestamp": {"$date": {"$numberLong": "1662681600000"}} }
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
com.mongodb.MongoCommandException: Command failed with error 72 (InvalidOptions): 'The field 'expireAfterSeconds' is not a valid collection option. Options: { capped: false, expireAfterSeconds: 86400, timeseries: { timeField: "timestamp", metaField: "metadata", granularity: "minutes" } }' on server %mongohostport%. The full response is {"ok": 0.0, "errmsg": "The field 'expireAfterSeconds' is not a valid collection option. Options: { capped: false, expireAfterSeconds: 86400, timeseries: { timeField: \"timestamp\", metaField: \"metadata\", granularity: \"minutes\" } }", "code": 72, "codeName": "InvalidOptions"}
com.mongodb.MongoCommandException: Command failed with error 72 (InvalidOptions): 'The field 'expireAfterSeconds' is not a valid collection option. Options: { capped: false, expireAfterSeconds: 315360000, timeseries: { timeField: "timestamp", metaField: "metadata", granularity: "minutes" } }' on server %mongohostport%. The full response is {"ok": 0.0, "errmsg": "The field 'expireAfterSeconds' is not a valid collection option. Options: { capped: false, expireAfterSeconds: 315360000, timeseries: { timeField: \"timestamp\", metaField: \"metadata\", granularity: \"minutes\" } }", "code": 72, "codeName": "InvalidOptions"}
{ "acknowledged": true, "insertedId": <ObjectID> }
{ "timestamp": {"$date": {"$numberLong": "1621296000000"}} }
{ "timestamp": {"$date": {"$numberLong": "1662681600000"}} }
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
{ "acknowledged": true, "insertedId": <ObjectID> }
{ "timestamp": {"$date": {"$numberLong": "1621296000000"}} }
{ "timestamp": {"$date": {"$numberLong": "1662681600000"}} }
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ db.createCollection('coll', {
metaField: "metadata",
granularity: "minutes"
},
expireAfterSeconds: 86400
expireAfterSeconds: 60 * 60 * 24 * 365 * 10
})
// command
db.coll.insertOne(
{
"metadata": { "sensorId": 5578, "type": "temperature" },
"timestamp": ISODate("2021-05-18T00:00:00.000Z"),
"timestamp": new ISODate("2022-09-09T00:00:00.000Z"),
"temp": 12
});
// command
db.coll.findOne({
"timestamp": ISODate("2021-05-18T00:00:00.000Z")
"timestamp": new ISODate("2022-09-09T00:00:00.000Z")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these changes necessary? They seem okay but shouldn’t make a difference since ISODate is not a constructor

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary but just looks better to me

}, {_id: 0, timestamp: 1});
// clear
db.coll.drop();