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

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
synw committed May 2, 2019
1 parent ab51378 commit 59b6669
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/sync_map.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Synchronized map
================

A map that will auto save it's values to the database.

.. highlight:: 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";

0 comments on commit 59b6669

Please sign in to comment.