當前位置: 首頁>>代碼示例>>Java>>正文


Java SQLiteQueryBuilder.buildQueryString方法代碼示例

本文整理匯總了Java中android.database.sqlite.SQLiteQueryBuilder.buildQueryString方法的典型用法代碼示例。如果您正苦於以下問題:Java SQLiteQueryBuilder.buildQueryString方法的具體用法?Java SQLiteQueryBuilder.buildQueryString怎麽用?Java SQLiteQueryBuilder.buildQueryString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.database.sqlite.SQLiteQueryBuilder的用法示例。


在下文中一共展示了SQLiteQueryBuilder.buildQueryString方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: toRawQuery

import android.database.sqlite.SQLiteQueryBuilder; //導入方法依賴的package包/類
public String toRawQuery() {
    String bindedWhere = this.where;
    for (int i = 0; i < this.whereArgs.length; i++) {
        String arg = this.whereArgs[i];
        bindedWhere = bindedWhere.replaceFirst("\\?", arg);
    }

    return SQLiteQueryBuilder.buildQueryString(
            false, this.table, this.projection, bindedWhere,
            this.groupBy, this.having, this.orderBy, this.limit
    );

}
 
開發者ID:nrudenko,項目名稱:dora,代碼行數:14,代碼來源:QueryBuilder.java

示例2: sampleSQLiteQueryBuilder

import android.database.sqlite.SQLiteQueryBuilder; //導入方法依賴的package包/類
public void sampleSQLiteQueryBuilder(SQLiteQueryBuilder builder, String input) {
    builder.appendWhere(input);
    //buildQueryString
    builder.buildQueryString(false, null, null, input, null, null, null, null);
    builder.buildQueryString(false, null, null, null, input, null, null, null);
    builder.buildQueryString(false, null, null, null, null, input, null, null);
    builder.buildQueryString(false, null, null, null, null, null, input,null);
    builder.buildQueryString(false, null, null, null, null, null,null, input);
    //query no limit
    builder.query(null, null, input, null, null, null,null);
    builder.query(null, null, null, null, input, null,null);
    builder.query(null, null, null, null,null,input,null);
    builder.query(null, null, null, null,null,null,input);
    //query with limit
    builder.query(null, null, input, null, null, null,null, null);
    builder.query(null, null, null, null, input, null,null, null);
    builder.query(null, null, null, null,null,input,null, null);
    builder.query(null, null, null, null,null,null,input, null);
    builder.query(null, null, null, null,null,null,null, input);
    //query with limit with cancellation system
    builder.query(null, null, input, null, null, null,null, null, new CancellationSignal());
    builder.query(null, null, null, null, input, null,null, null, new CancellationSignal());
    builder.query(null, null, null, null,null,input,null, null, new CancellationSignal());
    builder.query(null, null, null, null,null,null,input, null, new CancellationSignal());
    builder.query(null, null, null, null,null,null,null, input, new CancellationSignal());
    //buildQuery
    builder.buildQuery(null, input, null, null, null, null);
    builder.buildQuery(null, null, input,null, null, null);
    builder.buildQuery(null, null, null, input, null, null);
    builder.buildQuery(null, null, null, null, input, null);
    builder.buildQuery(null, null, null, null, null, input);
    //buildQuery with selectionArgs
    builder.buildQuery(null, input, new String[0], null, null, null, null);
    builder.buildQuery(null, null, new String[0], input, null, null, null);
    builder.buildQuery(null, null, new String[0],null, input,null, null);
    builder.buildQuery(null, null, new String[0],null, null, input,null);
    builder.buildQuery(null, null, new String[0],null, null, null, input);
    //buildUnionQuery
    builder.buildUnionQuery(new String[] {input}, null, null);
    builder.buildUnionQuery(null, input, null);
    builder.buildUnionQuery(null, null, input);
    //buildUnionSubQuery
    builder.buildUnionSubQuery(null, null, null,0, null, input, null, null);
    builder.buildUnionSubQuery(null, null, null,0, null, null, input, null);
    builder.buildUnionSubQuery(null, null, null,0, null, null, null, input);
    //buildUnionSubQuery with selectionArgs
    builder.buildUnionSubQuery(null, null, null,0, null, input, new String[0],null, null);
    builder.buildUnionSubQuery(null, null, null,0, null, null, new String[0], input, null);
    builder.buildUnionSubQuery(null, null, null,0, null, null, new String[0], null, input);
}
 
開發者ID:blackarbiter,項目名稱:Android_Code_Arbiter,代碼行數:51,代碼來源:AndroidSql.java


注:本文中的android.database.sqlite.SQLiteQueryBuilder.buildQueryString方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。