Skip to content
Siminov Framework edited this page Jan 17, 2016 · 10 revisions

Get Table Name

Android API: Get Table Name

    public final String getTableName() throws DatabaseException;
  • Android Sample: Get Table Name
    String tableName = null;
    try {
        tableName = new Book().getTableName();
    } catch(DatabaseException de) {
		//Log it.
    }

iOS API: Get Table Name

    - (NSString *)getTableName;
  • iOS Sample: Get Table Name
    NSString *tableName = nil;
    @try {
        tableName = [[[Book alloc] init] getTableName];
    } @catch(SICDatabaseException *databaseException) {
		//Log it.
    }

Windows API: Get Table Name

    public String GetTableName();
  • Windows Sample: Get Table Name
    String tableName = null;
    try 
    {
        tableName = new Book().GetTableName();
    } 
    catch(DatabaseException de) 
    {
		//Log it.
    }

JavaScript API: Get Table Name

    - this.getTableName = function();
    - this.getTableNameAsync = function(callback, transaction);
  • JavaScript Sample: Get Table Name
            /** Get Table Name Sample **/

    var tableName = null;
    try {
        tableName = new Book().getTableName();
    } catch(DatabaseException de) {
		//Log it.
    }
            /** Get Table Name Async Sample **/

    var callback = new Callback();
    callback.onSuccess = function(tableName) {

    }

    new Book().getTableNameAsync(callback);
            /** Get Table Name Async Transaction Sample **/

    var callback = new Callback();
    callback.onExecute = function(transaction) {

        var tableNameCallback = new Callback();
        tableNameCallback.onSuccess = function() {

        }

        new Book().getTableNameAsync(tableNameCallback, transaction);
    }

    callback.onSuccess = function() {

    }

    var databaseDescriptor = new Lession().getDatabaseDescriptor();
    Database.beginTransactionAsync(databaseDescriptor, callback);