Row returned from an SQL statement.

The row object can be used as an Array or as an object:

const rs = await client.execute("SELECT name, title FROM books");
for (const row in rs.rows) {
// Get the value from column `name`
console.log(row.name);
// Get the value from second column (`title`)
console.log(row[1]);
}

Hierarchy

  • Row

Indexable

[index: number]: Value

Properties

Properties

length: number

Number of columns in this row.

All rows in one ResultSet have the same number and names of columns.

Generated using TypeDoc