Query Class

class attachsql.query
column_count()

Returns the number of columns in a query result

Returns:The number of columns
Return type:int
row_get()

Returns a Python tuple containing strings of the row data for the current row

Returns:The row data
Return type:tuple
row_next()

Start retrieval of the next row

Returns:None
last_insert_id()

Returns the last insert ID from the previous query

Returns:The insert ID
Return type:long
affected_rows()

Returns the number of affected rows from the previous query

Returns:The number of affected rows
Return type:long
warning_count()

Returns the number of warnings generated by the last query

Returns:The warning count
Return type:long
info()

Returns the info from the last query

Returns:The query info
Return type:str
row_count()

Returns the row count for a buffered query

Returns:The row count
Return type:long
next_result()

Start retrieval of the next result set in a multi statement / result query

Returns:RETURN_PROCESSING for more results, RETURN_EOF for no more results
Return type:int
buffer_rows()

Enable row buffering for connection

Returns:True on success
Return type:bool
buffer_row_get()

Return the next row from a buffered result set in a similar way to row_get()

Returns:The row data
Return type:tuple
row_get_offset(offset)

Return a specific row from a buffered result set in a similar way to row_get()

Parameters:offset (long) – The offset row
Returns:The row data
Return type:tuple