Interested in improving this site? Please check the To Do page.

Back to SQLite Verbs

sqlite.getRow

Retrieve an entire row in an SQLite query

Syntax

sqlite.getRow(queryID)

Params

queryID is the query ID returned by sqlite.compileQuery.

Returns

A Frontier list containing the results of the query. The list returned contains one element corresponding to each returned column element in the query.

Examples

on easyQuery (dbID, queryString, maxRows=0) {
	local (compiledQuery, dataset={}, row, rowCount=0);
	compiledQuery = sqlite.compileQuery(dbID, queryString);
	loop {
		result = sqlite.stepQuery(compiledQuery);
		if result != 100 { // SQLite's code for more rows
			break};
		++rowCount;
		if (maxRows > 0) and (rowCount > maxRows) {
			break};
		row = sqlite.getRow(compiledQuery);
		dataset[rowCount] = row};
	sqlite.clearQuery(compiledQuery);
	return dataset}

Notes

The above example is the script code for the sqlite.easyQuery function. As you can see, it iterates through the returned rows, building up a list of results.

See Also


Personal Tools