Get Primary Keys
Siminov Framework edited this page Jan 16, 2016
·
7 revisions
public final Iterator<String> getPrimaryKeys() throws DatabaseException;
- Android Sample: Get Primary Keys
Iterator<String> primaryKeys = null;
try {
primaryKeys = new Book().getPrimeryKeys();
} catch(DatabaseException de) {
//Log it.
}
- (NSArray *)getPrimaryKeys;
- iOS Sample: Get Primary Keys
NSArray *primaryKeys = nil;
@try {
primaryKeys = [[[Book alloc] init] getPrimeryKeys];
} @catch(SICDatabaseException *databaseException) {
//Log it.
}
public IEnumerator<String> GetPrimaryKeys();
- Windows Sample: Get Primary Keys
IEnumerator<String> primaryKeys = null;
try
{
primaryKeys = new Book().GetPrimeryKeys();
}
catch(DatabaseException de)
{
//Log it.
}
- this.getPrimaryKeys = function();
- this.getPrimaryKeysAsync = function(callback, transaction);
- JavaScript Sample: Get Primary Keys
/** Get Primary Keys Sample **/
var primaryKeys = null;
try {
primaryKeys = new Book().getPrimeryKeys();
} catch(DatabaseException de) {
//Log it.
}
/** Get Primary Keys Async Sample **/
var callback = new Callback();
callback.onSuccess = function(primaryKeys) {
}
new Book().getPrimaryKeysAsync(callback);
/** Get Primary Keys Async Transaction Sample **/
var callback = new Callback();
callback.onExecute = function(transaction) {
var primaryKeysCallback = new Callback();
primaryKeysCallback.onSuccess = function() {
}
new Book().getPrimaryKeysAsync(primaryKeysCallback, transaction);
}
callback.onSuccess = function() {
}
var databaseDescriptor = new Lession().getDatabaseDescriptor();
Database.beginTransactionAsync(databaseDescriptor, callback);