Skip to content
This repository has been archived by the owner on May 7, 2023. It is now read-only.

Commit

Permalink
Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
synw committed May 2, 2019
1 parent ae4c48e commit ab51378
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,28 @@ parameter set to `true`:
}
```

## Synchronized map

A map that will auto save it's values to the database. Useful for values that
mostly get updated, like settings

```dart
import 'package:observable/observable.dart';
import 'package:sqlcool/sqlcool.dart';
// Define the map with initial data
var myMap = SynchronizedMap(
db: db, // an Sqlcool database
table: "a_table",
where: "id=1",
data: ObservableMap.from({"k": "v"}),
verbose: true
);
// Changing the map will auto update the data in the database:
myMap.data["k"] = "v2";
```

## Todo

- [x] Upsert
Expand Down

0 comments on commit ab51378

Please sign in to comment.