Placeholder for future editings (1)
The object DbxDatastore
Dim ds As DbxDatastore = manager.getDatastore(".KhR8uRUPUH963GBbcPvn5_RFH3Vp1XKq2pAqZtwynq4")
The Datastore can be treated like an sqlite-database. It´s the Database and it can hold any numbers of tables.
ds.setrole(String principal, String dsrole)
Sets the Role and the Pricipal to a Datastore.
Principal can be one of the strings "PUBLIC" or "TEAM".
Role can be one of the strings "OWNER", "EDITOR", "VIEWER" or "NONE".
This will only work with a "shareable Datastore"!
Available in Library v3.30
Returns whether this DbxDatastore can be shared with other users. (This is currently equivalent to whether the ID starts with ".".)
Available in Library v3.30
Returns whether this DbxDatastore is writable by the current user. (This is currently equivalent to whether the role is EDITOR or OWNER.)
Available in Library v3.30
Returns a set of all tables in the datastore that currently contain any records.
Example:
Dim tabellen As List = ds.ListTables
Log("Num Tables="&tabellen.Size)
For i = 0 To tabellen.Size-1
Dim dsid As String = tabellen.Get(i)
If dsid.StartsWith(":") Then
Else
Log(tabellen.Get(i))
End If
Next
Get the Table with the given name from the Datastore. A Table in this case is a object of Type
DbxTable.
The Table is a subset of an Datastore. The Table hold all Records which are in this Table.
Example:
Dim t As DbxTable = ds.getTable("customers")
Returns whether the Datastore is initialized or not.
Closes this datastore, and ceases monitoring for updates. This must be called to release this datastore when you're finished with it.
Any changes you committed with a call to
sync() are safe on disk, and will continue to upload in the background until the
DbxDatastoreManager is shut down, after which they will remain queued until the next time you open this datastore. Any changes made since the last call to
sync() will be discarded.
You must close a datastore when you're done using it to indicate to the Sync API that you are no longer interested in receiving updates for this datastore. After a call to this method, the Datastore can no longer be used and listeners will no longer be called. You must open the datastore again if you want to access it.
Returns the ID of this Datastore
Returns whether a Datastore is opened or not.
Returns the total number of records in this datastore.
Returns the size of this datastore in bytes. The overall size of a datastore is calculated by summing the size of all records, plus the base size of an empty datastore itself.
Returns the last modified time of this datastore, or null if no data has been synced yet.
The last modified time is automatically updated on each call to
sync() which commits local changes, or incorporates remote changes. The timestamp is based on the local clock of the device where the change is made.
Sync the Datastore. This is probably the MOST used command when working with Datastores. Everytime when you edit a record, change a record or create a new record in a table... All changes are in memory first.... A call of ds.Sync will "submit" all changes to the Datastore. The Dropbox manager will then sync th datastore with the dropboxserver mixing all together.
Apply all outstanding changes to the datastore, and also incorporate remote changes into this datastore. This method does not wait for network I/O, but does wait for disk I/O. When this method returns, all local changes have been safely saved to disk, and will be uploaded in the background.
Returns a map from table IDs to sets of
DbxRecords. These correspond to the tables and records that changed due to remote changes applied during this sync. Records deleted on the server will be included in the list, and you can call
DbxRecord.isDeleted() to detect them. If nothing was changed remotely, the result is an empty map.
NOTE: This is actually missing in the library but it stands on the Todo list.
Throws
DbxException.NotFound
if the datastore was deleted on the server.
DbxException
if there is a problem updating local state.
Gets or sets the Title of this Datastore
ds.BASE_CHANGE_SIZE ' The size in bytes of a change before accounting for the size of its values.The overall size of a change is this value plus the size of the values in the change.
ds.BASE_DATASTORE_SIZE ' The size in bytes of a datastore before accounting for the size of its records. The overall size of a datastore is this value plus the size of all records.
ds.BASE_UNSYNCED_CHANGES_SIZE ' The size in bytes of unsynced changes before accounting for the size of each change.The overall size of unsynced changes is this value plus the size of each change.
ds.DATASTORE_SIZE_LIMIT ' The maximum size in bytes of a datastore.
ds.UNSYNCED_CHANGES_SIZE_LIMIT ' The maximum size in bytes of changes that can be queued up between calls to sync().
ds.RECORD_COUNT_LIMIT ' The maximum number of records in a datastore.
Some Informations about sizes and limits.
tbc