ObjDB Reference

If you really want to know all the details, have a look at the source code.

Methods - All databases

open(string dbString, string user, string pass)

Open database or spreadsheet

Arguments:

Return Values:

Type

object

Description

handler for further operations

deleteRow(object handler, string table, object cond)

Delete a row from the database

Arguments:

Return Values:

Type

int

Description

nr. of rows affected?

insertRow(object handler, string table, object values)

Insert a row in the database

Arguments:

Return Values:

Type

int

Description

nr. of rows affected

updateRow(object handler, string table, object values, object cond)

Update a row in the database

Arguments:

Return Values:

Type

int

Description

nr. of rows affected?

replaceRow(object handler, string table, object values, object cond)

Replace a row in the database--insert if the row does not exist yet

Arguments:

Return Values:

Type

int

Description

nr. of rows affected?

getRows(object handler, string table, array columns, object cond, int limit)

Get result rows: columns from table where cond

Arguments:

Return Values:

Type

array

Description

array of objects, objects have column labels as keys

Methods - Spreadsheets only

setSkipRows(object handler, string table, int index, int howMany)

Set the rows to skip in sheets (spreadsheets only) so first row contains headers and second and below data similar to JS array splice function

Arguments:

Methods - JDBC only

query(object handler, string query)

Do a simple query without getting results, (jdbc only) useful for modifying, creating and deleting tables

Arguments:

Return Values:

Type

boolean

Description

indicating success or failure.

insertId(object handler)

Get key of last insert statement (jdbc only)

Arguments:

Name

handler

Type

object

Description

Return Values:

Type

int

Description

close(object handler)

Close the database connection (jdbc only)

Arguments:

Name

handler

Type

object

Description

update(object handler, string query)

Do an update query without getting results, (jdbc only) use for INSERT, DELETE, UPDATE

Arguments:

Return Values:

Type

int

Description

nr. of rows affected?

getRowsByQuery(object handler, string query)

Get result rows from a SELECT query (jdbc only)

Arguments:

Return Values:

Type

array

Description

array of objects, objects have column labels as keys