Skip to content

Commit c35c13e

Browse files
author
Giorgio Franceschetti
committed
0.10.3
1 parent acded36 commit c35c13e

File tree

4 files changed

+38
-3
lines changed

4 files changed

+38
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.10.3
4+
5+
- Fixed case insensitive flag in match operator (it was true instead of false and viceversa)
6+
37
## 0.10.2
48

59
- Change event improvements see [Pull Request #373](https://github.com/mongo-dart/mongo_dart/pull/373)

example/queries.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,24 @@ void main() async {
4040
.forEach((v) => print(v));
4141
print(
4242
"Filtered by (my_field gt 995 or my_field lt 10) and str_field like '99' ");
43+
print('---');
44+
await coll
45+
.find(where
46+
.gt('my_field', 995)
47+
.or(where.lt('my_field', 10))
48+
.and(where.match('str_field', 'Str', caseInsensitive: false)))
49+
.forEach((v) => print(v));
50+
print(
51+
"Filtered by (my_field gt 995 or my_field lt 10) and str_field like 'Str' caseInsensitive false");
52+
print('---');
53+
await coll
54+
.find(where
55+
.gt('my_field', 995)
56+
.or(where.lt('my_field', 10))
57+
.and(where.match('str_field', 'Str', caseInsensitive: true)))
58+
.forEach((v) => print(v));
59+
print(
60+
"Filtered by (my_field gt 995 or my_field lt 10) and str_field like 'Str' caseInsensitive true");
4361
await coll
4462
.find(where
4563
.inRange('my_field', 700, 703, minInclude: false)

pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: mongo_dart
2-
version: 0.10.2
2+
version: 0.10.3
33
description: MongoDB driver, implemented in pure Dart. All CRUD operations, aggregation pipeline and more!
44
homepage: https://github.com/mongo-dart/mongo_dart
55

@@ -23,7 +23,7 @@ dependencies:
2323

2424
dev_dependencies:
2525
test: ^1.16.4
26-
lints: ^3.0.0
26+
lints: ^4.0.0
2727

2828
false_secrets:
2929
- /test/certificates_for_testing/*.key

test/auth_tests/client_x_509_test.dart

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ void main() async {
178178
secure: true,
179179
tlsCAFile: caCertFile.path,
180180
tlsCertificateKeyFile: pemFile.path);
181+
182+
var collection = db.collection('test');
183+
expect(db.masterConnection.isAuthenticated, isTrue);
184+
await collection.find().toList();
181185
await db.close();
182186
});
183187

@@ -196,7 +200,7 @@ void main() async {
196200
tlsCertificateKeyFile: pemFile.path);
197201
await db.close();
198202
});
199-
test('Connect & Authenticate - Simple find()', () async {
203+
test('Connect & Authenticate - Simple find() - error', () async {
200204
var db = Db(lateAuthUri);
201205

202206
await db.open(
@@ -205,6 +209,15 @@ void main() async {
205209
tlsCertificateKeyFile: pemFile.path);
206210
var collection = db.collection('test');
207211
expect(() => collection.find().toList(), throwsMongoDartError);
212+
});
213+
test('Connect & Authenticate - Simple find()', () async {
214+
var db = Db(lateAuthUri);
215+
216+
await db.open(
217+
secure: true,
218+
tlsCAFile: caCertFile.path,
219+
tlsCertificateKeyFile: pemFile.path);
220+
var collection = db.collection('test');
208221
await db.authenticateX509();
209222
await collection.find().toList();
210223
expect(db.masterConnection.isAuthenticated, isTrue);

0 commit comments

Comments
 (0)