Since

1.0

The one object from database. You can not create instance from DatabaseObject, you should use Data.Database.QueryResult#getFirst QueryResult.getFirst, Data.Database.QueryResult#getLast QueryResult.getLast or Data.Database.QueryResult#get QueryResult.get,

Example

// Assuming Database and person table already created
var selectedPeople = [];
// Getting people who older than 15 years old and name begins with A.
var selectedPeopleQueryResult = database.query("SELECT * FROM person WHERE(age > 25 AND name LIKE 'A%')");
for(var i = 0; i < selectedPeopleQueryResult.count() ; i++){
// Getting person
var selectedPerson = selectedPeopleQueryResult.get(i);
selectedPeople.push( {
name: selectedPerson.getString('name'),
age: selectedPerson.getInteger('age'),
isWorker: selectedPerson.getInteger('isWorker'),
rate: selectedPerson.getFloat('rate'),
} );
}

Hierarchy

  • DatabaseObject

Constructors

  • Parameters

    • params: { data: any; columnNames: string[] }
      • data: any
      • columnNames: string[]

    Returns DatabaseObject

Methods

  • Returns given column name with String. If the given column is not String will thrown exception.

    Method

    getString

    Returns

    Android

    Ios

    Throws

    Since

    1.0

    Parameters

    • columnName: string

    Returns string

  • Returns given column name with Integer. If the given column is not Integer will thrown exception.

    Method

    getInteger

    Returns

    Android

    Ios

    Throws

    Since

    1.0

    Parameters

    • columnName: string

    Returns number

  • Returns given column name with Boolean. If the given column is not Boolean will thrown exception.

    Method

    getBoolean

    Returns

    Android

    Ios

    Throws

    Since

    1.0

    Parameters

    • columnName: string

    Returns boolean

  • Returns given column name with Float. If the given column is not Float will thrown exception.

    Method

    getFloat

    Returns

    Android

    Ios

    Throws

    Since

    1.0

    Parameters

    • columnName: string

    Returns number

Generated using TypeDoc