Database
The database object allows for the reading, writing, and management of data in the currently connected database.
|
addsyncbox |
|
|
Description |
Adds a record to the list of values that will be sent to the Nios4 server during the next synchronization. |
|
Type Value |
|
|
Format |
database.addsyncbox(tablename, gguid) |
|
Typology |
Metodo |
|
Systems |
Windows, Web, Android, IOS, Mac OS |
|
Parametro |
Tipo Valore |
Description |
|
gguid |
string |
The unique index that uniquely identifies the record. |
|
tablename |
string |
The name of the table from which the record will be retrieved. |
|
Examples |
|
database.addsyncbox(`orders`,`YYYY-YYYY`) |
|
createdocument |
|
|
Description |
Create a document object. |
|
Type Value |
document |
|
Format |
document = database.createdocument(gguidprinter, tablename, gguid) |
|
Typology |
Metodo |
|
Systems |
Windows, Web, Android, IOS, Mac OS |
|
Parametro |
Tipo Valore |
Description |
|
gguid |
string |
The index of the record from which to retrieve the data for printing. |
|
gguidprinter |
string |
The index of the printing to be used. |
|
tablename |
string |
The name of the table from which to retrieve the data for printing. |
|
Examples |
|
document = database.createdocument(`xxx-xxx`.`orders`,`yyy-yyy`) |
|
dbnull |
|
|
Description |
Check if the passed value is null or not. |
|
Type Value |
boolean |
|
Format |
boolean = database.dbnull(value) |
|
Typology |
Metodo |
|
Systems |
Windows, Web, Android, IOS, Mac OS |
|
Parametro |
Tipo Valore |
Description |
|
value |
string |
The value to be checked |
|
Examples |
|
bool = database.dbnull(value) |
|
deletedatarow |
|
|
Description |
Delete a specific datarow object. |
|
Type Value |
boolean |
|
Format |
boolean = database.deletedatarow(row) |
|
Typology |
Metodo |
|
Systems |
Windows, Web, Android, IOS, Mac OS |
|
Parametro |
Tipo Valore |
Description |
|
row |
datarow |
The DataRow object to delete |
|
Examples |
|
bool = database.deletedatarow(row) |
|
deletedatarowsql |
|
|
Description |
Delete the records extracted from an SQL search. |
|
Type Value |
boolean |
|
Format |
boolean = database.deletedatarowsql(sql) |
|
Typology |
Metodo |
|
Systems |
Windows, Web, Android, IOS, Mac OS |
|
Parametro |
Tipo Valore |
Description |
|
sql |
string |
The SQL request |
|
Examples |
|
bool = database.deletedatarowsql(`SELECT * FROM orders WHERE togarbage=1`) |
|
fieldexist |
|
|
Description |
Check if a field exists within a specific table. |
|
Type Value |
boolean |
|
Format |
boolean = database.fieldexist(tablename, fieldname) |
|
Typology |
Metodo |
|
Systems |
Windows, Web, Android, IOS, Mac OS |
|
Parametro |
Tipo Valore |
Description |
|
fieldname |
string |
The name of the field that will be searched within the table. |
|
tablename |
string |
The name of the table on which the check will be performed. |
|
Examples |
|
bool = database.fieldexist(`orders`,`customer`) |
|
getconst |
|
|
Description |
Retrieve the value of a database constant. |
|
Type Value |
string |
|
Format |
string = database.getconst(key) |
|
Typology |
Metodo |
|
Systems |
Windows, Web, Android, IOS, Mac OS |
|
Parametro |
Tipo Valore |
Description |
|
key |
string |
The key to the constant. |
|
getind |
|
|
Description |
Returns the incremental index to be associated with a new record. |
|
Type Value |
integer |
|
Format |
integer = database.getind(tablename) |
|
Typology |
Metodo |
|
Systems |
Windows, Web, Android, IOS, Mac OS |
|
Parametro |
Tipo Valore |
Description |
|
tablename |
string |
The name of the table from which to extract the index to use. |
|
Examples |
|
integer = database.getind(`orders`) |
|
getsql |
|
|
Description |
Execute an SQL command to retrieve records from the database. |
|
Type Value |
datatable |
|
Format |
datatable = database.getsql(sql) |
|
Typology |
Metodo |
|
Systems |
Windows, Web, Android, IOS, Mac OS |
|
Parametro |
Tipo Valore |
Description |
|
sql |
string |
The SQL string to be executed. |
|
Examples |
|
datatable = database.getsql(`SELECT * FROM orders WHERE arc=2`) |
|
table = database.getsql(`SELECT * FROM customers WHERE nation =`italy``) |
|
incrementcounter |
|
|
Description |
It allows to increase a global counter by one unit. |
|
Type Value |
|
|
Format |
database.incrementcounter(gcounter) |
|
Typology |
Metodo |
|
Systems |
Windows, Web, Android, IOS, Mac OS |
|
Parametro |
Tipo Valore |
Description |
|
gcounter |
string |
The unique identifier of the global counter. |
|
Examples |
|
database.incrementcounter(`XXX-XXX`) |