Developer   API   Files and Databases   Database

Database(native)

This class allows to manipulate local SQLite database.

Example

// load database file var database = Database.open("dat://db.db"); // create SQL query var result = database.exec("....SQL QUERY...."); // release sources reserved for database database.close();

Methods

  • close()
    This function release resource, allocated in memory. It is recommended to use this function, when dabase is no longer needed.
  • exec(sql, [, value1 [, value2 [, ... valueN]]]) : Dataset
    Easy way to make sql request.
  • lastInsertedID() : Integer
    Useful tool to find out last ID insert into database.
  • open(file) : Database
    Open database file. Supported format is .db - SQLite file.