FhirDb class
Methods
addAll (List <Resource > resources , {String ? pw })
→ Future <bool >
clear ({String ? pw })
→ Future <bool >
clearGeneral ({String ? pw })
→ Future <bool >
closeAllBoxes ()
→ Future <void >
closeGeneralBox ({String ? pw })
→ Future <void >
Close the general box
closeHistoryBox ({String ? pw })
→ Future <void >
Close the history box
closeResourceBoxes ({required List <Dstu2ResourceType > types , String ? pw })
→ Future <void >
Specify a list of which boxes you want to close
closeTypesBox ({String ? pw })
→ Future <void >
Close the types box
delete ({Resource? resource , Dstu2ResourceType? resourceType , String ? id , bool finder (Map <String , dynamic > )?, String ? pw })
→ Future <bool >
Delete specific resource
deleteAllGeneral ({String ? pw })
→ Future <bool >
Deletes everything stored in the general store
deleteAllResources ({String ? pw })
→ Future <bool >
Deletes all resources, including historical versions
deleteDatabase ({String ? pw })
→ Future <void >
deletefromGeneral ({required int key , String ? pw })
→ Future <bool >
deleteSingleType ({Dstu2ResourceType? resourceType , Resource? resource , String ? pw })
→ Future <bool >
pass in a resourceType or a resource, and db will delete all resources of
that type - Note: will NOT delete any _historical stores (must pass in
_history as the type for this to happen)
exists ({required Dstu2ResourceType resourceType , required String id , String ? pw })
→ Future <bool >
find ({Resource? resource , Dstu2ResourceType? resourceType , String ? id , List <Object > ? field , String ? value , String ? pw })
→ Future <List <Resource > >
searches for a specific Resource
. That resource can be defined by
passing a full Resource
object, you may pass a resourceType
and id
or you can pass a search field
- since we are dealing with maps, this
should be a list of strings or integers, and this function will walk
through them:
get ({required Dstu2ResourceType resourceType , required String id , String ? pw })
→ Future <Resource? >
function used to save a new resource in the db
getActiveResourcesOfType ({List <Dstu2ResourceType > ? resourceTypes , List <String > ? resourceTypeStrings , Resource? resource , String ? pw })
→ Future <List <Resource > >
returns all resources of a specific type
getAllActiveResources ({String ? pw })
→ Future <List <Resource > >
returns all resources in the db
, including historical versions
getAllGeneral ({String ? pw })
→ Future <Iterable <Object > >
init ({String ? path , String ? pw })
→ Future <void >
Initalizes the database, configure its path, and return it
listen ({required Dstu2ResourceType resourceType , String ? id , String ? pw })
→ Stream <Resource? >
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readGeneral ({required int key , String ? pw })
→ Future <Object ? >
save ({Resource? resource , String ? pw })
→ Future <Resource >
Saves a Resource
to the local Db, cipher
is optional (but after set,
it must always be used everytime), will update the FhirFhirFhirMeta fields
of the Resource
and adds an id if none is already given.
saveAll ({required List <Resource > resources , String ? pw })
→ Future <bool >
The built-in bulkSave (called addAll) for Hive only allows automatically
generated, incremented (int) IDs, so this function really just calls the
save function over and over
saveGeneral ({required Object object , int ? key , String ? pw })
→ Future <int >
search ({required Dstu2ResourceType resourceType , required bool finder (Map <String , dynamic > ), String ? pw })
→ Future <Iterable <Resource > >
searchGeneral ({required bool finder (Object ), String ? pw })
→ Future <Iterable <Object > >
toString ()
→ String
A string representation of this object.
inherited
updateCipher ({String ? path , String ? oldPw , String ? newPw })
→ Future <void >
updatePw ({String ? oldPw , String ? newPw })
→ Future <void >