Cursor的简单说明

public interface Cursor implements Closeable

Class Overview
This interface provides random read-write access to the result set returned by a database query.

Public Methods

abstract void 
close()  
Closes the Cursor, releasing all of its resources and making it completely invalid. 

abstract int
getColumnCount()
Return total number of columns

abstract int 
getColumnIndex(String columnName)
Returns the zero-based index for the given column name, or -1 if the column doesn't exist.

abstract int
getColumnIndexOrThrow(String columnName)
Returns the zero-based index for the given column name, or throws IllegalArgumentException if the column doesn't exist.

abstract String
getColumnName(int columnIndex)
Returns the column name at the given zero-based column index.

abstract String[]
getColumnNames()
Returns a string array holding the names of all of the columns in the result set in the order in which they were listed in the result.

abstract int
getCount()
Returns the numbers of rows in the cursor.

abstract int
getPosition()
Returns the current position of the cursor in the row set.

abstract String
getString(int columnIndex)
Returns the value of the requested column as a String.

abstract float
getFloat(int columnIndex)
Returns the value of the requested column as a float.

abstract int
getType(int columnIndex)
Returns data type of the given column's value.

abstract boolean
move(int offset)
Move the cursor by a relative amount, forward or backward, from the current position.
从当前位置向前或向后移动光标一定距离

abstract boolean
moveToFirst()
Move the cursor to the first row.

abstract boolean
moveToNext()
Move the cursor to the next row.

abstract boolean
moveToPosition(int position)
Move the cursor to an absolute position.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值