File tree 2 files changed +8
-0
lines changed
2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ enum _PutMode {
17
17
Update ,
18
18
}
19
19
20
+ /// A box to store objects of a particular class.
20
21
class Box <T > {
21
22
Store _store;
22
23
Pointer <Void > _cBox;
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ enum TxMode {
13
13
Write ,
14
14
}
15
15
16
+ /// Represents an ObjectBox database and works together with [Box] to allow getting and putting Objects of
17
+ /// specific type.
16
18
class Store {
17
19
Pointer <Void > _cStore;
18
20
Map <Type , EntityDefinition > _entityDefinitions = {};
@@ -45,6 +47,10 @@ class Store {
45
47
checkObxPtr (_cStore, "failed to create store" );
46
48
}
47
49
50
+ /// Closes this store.
51
+ ///
52
+ /// This method is useful for unit tests; most real applications should open a Store once and keep it open until
53
+ /// the app dies.
48
54
close () {
49
55
checkObx (bindings.obx_store_close (_cStore));
50
56
}
@@ -75,5 +81,6 @@ class Store {
75
81
}
76
82
}
77
83
84
+ /// The low-level pointer to this store.
78
85
get ptr => _cStore;
79
86
}
You can’t perform that action at this time.
0 commit comments