Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rodydavis/pocketbase_drift
Pocketbase client cached with drift (sqlite)
https://github.com/rodydavis/pocketbase_drift
Last synced: 29 days ago
JSON representation
Pocketbase client cached with drift (sqlite)
- Host: GitHub
- URL: https://github.com/rodydavis/pocketbase_drift
- Owner: rodydavis
- License: apache-2.0
- Created: 2022-10-03T07:06:43.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-08-10T20:49:59.000Z (over 1 year ago)
- Last Synced: 2024-10-09T12:27:34.564Z (about 1 month ago)
- Language: Dart
- Size: 913 KB
- Stars: 40
- Watchers: 5
- Forks: 8
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pocketbase - GitHub - 2.0 | (Dart)
- awesome-pocketbase - GitHub - 2.0 | (Dart)
- awesome-pocketbase - PocketBase Drift - A PocketBase client cached with Drift. ![GitHub Repo stars](https://img.shields.io/github/stars/rodydavis/pocketbase_drift) (Dart/Flutter)
README
# PocketBase Drift
[PocketBase](https://pub.dev/packages/pocketbase) client cached with [Drift](https://pub.dev/packages/drift).
- Full Text Search
- Offline first
- Partial updates
- CRUD support
- SQLite storage
- All platforms supported
- [Example app](/example/)
- Tests## Getting Started
Replace a pocketbase client with a drift client.
```diff
- import 'package:pocketbase/pocketbase.dart';
+ import 'package:pocketbase_drift/pocketbase_drift.dart';- final client = PocketBase(
+ final client = $PocketBase.database(
'http://127.0.0.1:8090',
);
```## Web
For web, you need to follow the instructions for [Drift](https://drift.simonbinder.eu/web/#drift-wasm) to copy the [sqlite wasm](https://github.com/simolus3/sqlite3.dart/releases) binary into the `web/` directory.
## TODO
- [X] Add support for offline mutations and retry
- [X] Add tests to cover offline actions
- [X] Authentication persistence
- [X] Offline collections
- [X] Offline records
- [X] Full text search for all local records
- [X] Add support for fields (select)
- [X] Add support for sort
- [X] Add support for expand single/multi
- [X] Add support for pagination
- [ ] Add support for indirect expand
- [ ] Add support validation of create/update for required fields
- [ ] Add support for files (and local)