File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ enum _PutMode {
1717 Update ,
1818}
1919
20+ /// A box to store objects of a particular class.
2021class Box <T > {
2122 Store _store;
2223 Pointer <Void > _cBox;
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ enum TxMode {
1313 Write ,
1414}
1515
16+ /// Represents an ObjectBox database and works together with [Box] to allow getting and putting Objects of
17+ /// specific type.
1618class Store {
1719 Pointer <Void > _cStore;
1820 Map <Type , EntityDefinition > _entityDefinitions = {};
@@ -45,6 +47,10 @@ class Store {
4547 checkObxPtr (_cStore, "failed to create store" );
4648 }
4749
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.
4854 close () {
4955 checkObx (bindings.obx_store_close (_cStore));
5056 }
@@ -75,5 +81,6 @@ class Store {
7581 }
7682 }
7783
84+ /// The low-level pointer to this store.
7885 get ptr => _cStore;
7986}
You can’t perform that action at this time.
0 commit comments