codecamp

鸿蒙OS SharedResultSet

SharedResultSet

public interface SharedResultSet
extends ResultSet

提供访问通过跨进程查询数据库获得的数据库结果集的方法。

此类扩展了 ResultSet 类。 该类中的一些方法由抽象类 AbsSharedResultSet 实现。

Since:

3

嵌套类摘要

从接口 ohos.data.resultset.ResultSet 继承的嵌套类/接口
ResultSet.ColumnType

方法总结

修饰符和类型 方法 描述
void fillBlock(int startRowIndex, SharedBlock block) 将 SharedResultSet 的数据添加到 SharedBlock。
SharedBlock getBlock() 从 SharedResultSet 中获取一个块。
boolean onGo(int oldRowIndex, int newRowIndex) 当结果集的位置发生变化时调用。
从接口 ohos.data.resultset.ResultSet 继承的方法
close, getAffectedByUris, getAllColumnNames, getBlob, getColumnCount, getColumnIndexForName, getColumnNameForIndex, getColumnTypeForIndex, getDouble, getExtensions, getFloat, getInt, getLong, getRowCount, getRowIndex, getShort, getString, goTo, goToFirstRow, goToLastRow, goToNextRow, goToPreviousRow, goToRow, isAtFirstRow, isAtLastRow, isClosed, isColumnNull, isEnded, isStarted, registerObserver, setAffectedByUris, setExtensions, unregisterObserver

方法详情

getBlock

SharedBlock getBlock()

从 SharedResultSet 中获取一个块。

该块包含 SharedResultSet 的一些数据。

返回:

如果找到,则返回该块; 否则返回 null。

Since:

3

fillBlock

void fillBlock(int startRowIndex, SharedBlock block)

将 SharedResultSet 的数据添加到 SharedBlock。

该方法用于将 SharedResultSet 的数据(从 startRowIndex 位置开始)添加到 SharedBlock 中,直到 SharedResultSet 的所有数据都添加到 SharedBlock 或 SharedBlock 空间不足。

参数:

参数名称 参数描述
startRowIndex 表示 SharedResultSet 中的索引。 索引从 0 开始,表示第一行。
block 表示要将其数据添加到 SharedResultSet 的块。

Since:

3

onGo

boolean onGo(int oldRowIndex, int newRowIndex)

当结果集的位置发生变化时调用。

当结果集移动到新位置时,调用该方法通知子类移动结果。 如果返回 false,则结果集将移动到 beforeFirst 位置。

参数:

参数名称 参数描述
oldRowIndex 表示结果集的原始位置。
newRowIndex 指示结果集的新位置。

返回:

如果结果集移动成功,则返回 true; 否则返回 false。

Since:

3

鸿蒙OS ResultSetHook
鸿蒙OS ohos.agp.utils class
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

鸿蒙OS 开发

鸿蒙OS 术语

鸿蒙OS Java API参考

鸿蒙OS ohos.aafwk.ability

鸿蒙OS ohos.aafwk.abilityjet.activedata

鸿蒙OS ohos.aafwk.content

鸿蒙OS java.lang

鸿蒙OS java.Util

鸿蒙OS java.Util class

鸿蒙OS ohos.data.dataability

鸿蒙OS ohos.data.dataability class

鸿蒙OS ohos.agp.components

鸿蒙OS ohos.agp.components interface

鸿蒙OS ohos.agp.components class

鸿蒙OS ohos.global.configuration

鸿蒙OS java.io

鸿蒙OS ohos.data.resultset

鸿蒙OS ohos.data.resultset interface

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }