https://github.com/mongorpc/mongorpc-dart
mongorpc client for flutter
https://github.com/mongorpc/mongorpc-dart
dart flutt flutter grpc mongodb mongorpc mongorpc-client
Last synced: 5 months ago
JSON representation
mongorpc client for flutter
- Host: GitHub
- URL: https://github.com/mongorpc/mongorpc-dart
- Owner: mongorpc
- License: apache-2.0
- Created: 2021-11-06T17:30:30.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-01-05T13:09:29.000Z (5 months ago)
- Last Synced: 2026-01-13T05:26:40.119Z (5 months ago)
- Topics: dart, flutt, flutter, grpc, mongodb, mongorpc, mongorpc-client
- Language: Dart
- Homepage: https://pub.dev/packages/mongorpc
- Size: 230 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# mongorpc_dart
Dart client for MongoRPC - a gRPC proxy for MongoDB.
## Installation
Add dependencies to your `pubspec.yaml`:
```yaml
dependencies:
mongorpc_dart:
git: https://github.com/mongorpc/mongorpc-dart.git
```
## Quick Start
```dart
import 'package:mongorpc_dart/mongorpc_dart.dart';
void main() async {
// Connect
final client = MongoRPC('localhost', 50051);
final users = client.database('mydb').collection('users');
// Insert
final id = await users.insertOne({
'name': 'Alice',
'age': 30,
});
// Find by ID
final doc = await users.findById(id);
print(doc);
// Find with filter
final results = await users.find({
'age': {'$gte': 21},
});
// Update
await users.updateById(id, {
'\$set': {'verified': true},
});
// Delete
await users.deleteById(id);
await client.close();
}
```