当前位置: 首页>>代码示例>>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;未经允许,请勿转载。