8000
Hi,
How can I set a timeout for opening a connection and querying data?
Thanks
Yup, it will be very helpful feature
On crud operations you have to use the "modern" methods. For setting a timeout of 5000 MS on a find operation you could do:
var res = await collection.modernFind(filter: { 'rating': {r'$gt': 60} }, sort: { 'state': 1, 'name': 1 }, findOptions: FindOptions(maxTimeMS: 5000)).toList();
Can we set a timeout on the open() command?
On crud operations you have to use the "modern" methods. For setting a timeout of 5000 MS on a find operation you could do: var res = await collection.modernFind(filter: { 'rating': {r'$gt': 60} }, sort: { 'state': 1, 'name': 1 }, findOptions: FindOptions(maxTimeMS: 5000)).toList();
Is there any way to do the same with an insert or delete ?
How do I set the timeout period when I connect to db
Activity
matisiekpl commentedon May 27, 2021
Yup, it will be very helpful feature
giorgiofran commentedon Jun 4, 2021
On crud operations you have to use the "modern" methods.
For setting a timeout of 5000 MS on a find operation you could do:
natgross commentedon Feb 9, 2022
Can we set a timeout on the open() command?
stMerlHin commentedon May 4, 2023
Is there any way to do the same with an insert or delete ?
cjcj125125 commentedon Mar 25, 2024
How do I set the timeout period when I connect to db