Skip to content

Get Mandatory Fields

Siminov Framework edited this page Jan 16, 2016 · 7 revisions

Get Mandatory Fields

Android API: Get Mandatory Fields

    public final Iterator<String> getMandatoryFields() throws DatabaseException;
  • Android Sample: Get Column Names
    Iterator<String> mandatoryFields = null;
    try {
        mandatoryFields = new Book().getMandatoryFields();
    } catch(DatabaseException de) {
		//Log it.
    }

iOS API: Get Mandatory Fields

    - (NSArray *)getMandatoryFields;
  • iOS Sample: Get Column Names
    NSArray *mandatoryFields = nil;
    @try {
        mandatoryFields = [[[Book alloc] init] getMandatoryFields];
    } @catch(SICDatabaseException *databaseException) {
		//Log it.
    }

Windows API: Get Mandatory Fields

    public IEnumerator<String> GetMandatoryFields();
  • Windows Sample: Get Column Names
    IEnumerator<String> mandatoryFields = null;
    try 
    {
        mandatoryFields = new Book().GetMandatoryFields();
    } 
    catch(DatabaseException de) 
    {
		//Log it.
    }

JavaScript API: Get Mandatory Fields

    - this.getMandatoryFields = function();
    - this.getMandatoryFieldsAsync = function(callback, transaction);
  • JavaScript Sample: Get Column Names
            /** Get Mandatory Fields Sample **/
   
    var mandatoryFields = null;
    try {
        mandatoryFields = new Book().getMandatoryFields();
    } catch(DatabaseException de) {
		//Log it.
    }
            /** Get Mandatory Fields Async Sample **/

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

    }

    new Book().getMandatoryFieldsAsync(callback);
            /** Get Mandatory Fields Async Transaction API **/
 
    var callback = new Callback();
    callback.onExecute = function(transaction) {

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

        }

        new Book().getMandatoryFieldsAsync(mandatoryFieldsCallback, transaction);
    }

    callback.onSuccess = function() {

    }

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