Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cachapa/sqlite_crdt
Dart implementation of Conflict-free Replicated Data Types (CRDTs) using Sqlite
https://github.com/cachapa/sqlite_crdt
crdt dart database flutter sql sqlite sqlite3
Last synced: about 1 month ago
JSON representation
Dart implementation of Conflict-free Replicated Data Types (CRDTs) using Sqlite
- Host: GitHub
- URL: https://github.com/cachapa/sqlite_crdt
- Owner: cachapa
- License: apache-2.0
- Created: 2023-04-12T08:09:48.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-03-15T18:30:30.000Z (10 months ago)
- Last Synced: 2024-03-15T19:44:10.404Z (10 months ago)
- Topics: crdt, dart, database, flutter, sql, sqlite, sqlite3
- Language: Dart
- Homepage: https://pub.dev/packages/sqlite_crdt
- Size: 93.8 KB
- Stars: 21
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
Dart implementation of Conflict-free Replicated Data Types (CRDTs) using Sqlite.
This package implements [sql_crdt](https://github.com/cachapa/sql_crdt).## Setup
Awaiting async functions is extremely important and not doing so can result in all sorts of weird behaviour.
You can avoid them by activating the `unawaited_futures` linter warning in *analysis_options.yaml*:```yaml
linter:
rules:
unawaited_futures: true
```This package uses [sqflite](https://pub.dev/packages/sqflite). There's a bit of extra setup necessary depending on where you intend to run your code:
### Android & iOS
`sqlite_crdt` uses recent Sqlite features that may not be available in every system's embedded libraries.
To get around this, import the [sqlite3_flutter_libs](https://pub.dev/packages/sqlite3_flutter_libs) package into your project:
```yaml
sqlite3_flutter_libs: ^0.5.12
```### Desktop, Server
On the desktop and server, Sqflite uses the system libraries so make sure those are installed.
On Debian, Raspbian, Ubuntu, etc:
```bash
sudo apt install libsqlite3 libsqlite3-dev
```On Fedora:
```bash
sudo dnf install sqlite-devel
```Otherwise check the instructions on [sqflite_common_ffi](https://pub.dev/packages/sqflite_common_ffi).
### Web
This package has experimental support for Flutter Web, thanks to [sqflite_common_ffi_web](https://pub.dev/packages/sqflite_common_ffi_web).
In order to use this feature you'll need to install the Sqlite3 web binaries by running the following command from the project's root:
```bash
dart run sqflite_common_ffi_web:setup
```## Usage
Check [example.dart](https://github.com/cachapa/sqlite_crdt/blob/master/example/example.dart) for more details.
## Features and bugs
Please file feature requests and bugs in the [issue tracker](https://github.com/cachapa/sqlite_crdt/issues).