Sporran class
This is the main Sporran API class.
Please read the usage and interface documentation supplied for further details.
Constructors
- Sporran(SporranInitialiser initialiser)
- Construction.
Properties
- autoSync ↔ bool
-
Manual control of sync().
getter/setter pair
- clientCompleter ← JsonObjectLite
-
Completion function
no getter
- completionResponse → JsonObjectLite?
-
no setter
- dbName → String
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- lawndart → Store
-
Lawndart database
no setter
- lawnIsOpen → bool
-
Lawndart database is open
no setter
- manualNotificationControl → bool
-
Manual notification control
no setter
- online ↔ bool
-
On/Offline indicator
getter/setter pair
- onReady → Stream?
-
Ready event
no setter
- pendingDeleteSize → int
-
Pending delete queue size
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- wilt → Wilt
-
Wilt database
no setter
Methods
-
bulkCreate(
Map< String, JsonObjectLite> docList) → Future - Bulk document create.
-
delete(
String id, [String rev = '']) → Future - Delete a document.
-
deleteAttachment(
String id, String attachmentName, [String rev = '']) → Future - Delete an attachment. Revision can be null if offline. If the parameters are invalid null is returned.
-
get(
String id, [String rev = '']) → Future - Get a document If the parameters are invalid null is returned.
-
getAllDocs(
{bool includeDocs = false, int limit = 10, String? startKey, String? endKey, List< String> keys = const <String>[], bool descending = false}) → Future<JsonObjectLite> - Get all documents.
-
getAttachment(
String id, String attachmentName) → Future - Get an attachment. If the parameters are invalid null is returned.
-
getDatabaseInfo(
) → Future< JsonObjectLite> - Get information about the database.
-
login(
String user, String password) → void - Login
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
put(
String id, JsonObjectLite document, [String rev = '']) → Future - Update document.
-
putAttachment(
String id, dynamic attachment) → Future - Put attachment
-
startChangeNotifications(
) → void - Start change notification manually
-
stopChangeNotifications(
) → void - Stop change notification manually
-
sync(
) → void - Synchronise local storage and CouchDb when we come online or on demand.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- bulkCreatec → const String
- dbInfoc → const String
- deleteAttachmentc → const String
- deletec → const String
- getAllDocsc → const String
- getAttachmentc → const String
- getc → const String
- putAttachmentc → const String
- putc → const String
- Method constants