SQLiteQueryBuilder.query

1 篇文章 / 0 new
author
SQLiteQueryBuilder.query

public Cursor query (SQLiteDatabase db, String[] projectionIn, String selection, String[] selectionArgs, String groupBy, String having, String sortOrder, String limit)

public Cursor query (SQLiteDatabase db, String[] projectionIn, String selection, String[] selectionArgs, String groupBy, String having, String sortOrder)

Perform a query by combining all current settings and the information passed into this method.

Parameters
dbthe database to query on
projectionIn傳入要取回的欄位名稱陣列,若傳入null時則傳回所有欄位資料
selectionSQL WHERE 敘述據的條件資料. null 則傳回所有資料
selectionArgs若 WHERE 條件敘述內有使用 ? 變數, 則變數資料由此帶入
groupBySQL GROUP BY 條件設定
havingSQL HAVING 條件設定
sortOrderSQL ORDER BY 條件設定
limit限定傳回筆數, null 則不限定
Returns
  • a cursor over the result set
Free Web Hosting