当前位置: 首页>>代码示例>>Java>>正文


Java DatabaseWrapper.compileStatement方法代码示例

本文整理汇总了Java中com.raizlabs.android.dbflow.structure.database.DatabaseWrapper.compileStatement方法的典型用法代码示例。如果您正苦于以下问题:Java DatabaseWrapper.compileStatement方法的具体用法?Java DatabaseWrapper.compileStatement怎么用?Java DatabaseWrapper.compileStatement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.raizlabs.android.dbflow.structure.database.DatabaseWrapper的用法示例。


在下文中一共展示了DatabaseWrapper.compileStatement方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: executeUpdateDelete

import com.raizlabs.android.dbflow.structure.database.DatabaseWrapper; //导入方法依赖的package包/类
@Override
public long executeUpdateDelete(@NonNull DatabaseWrapper databaseWrapper) {
    final DatabaseStatement statement = databaseWrapper.compileStatement(getQuery());
    long affected;
    try {
        affected = statement.executeUpdateDelete();

        // only notify for affected.
        if (affected > 0) {
            NotifyDistributor.get().notifyTableChanged(getTable(), getPrimaryAction());
        }
    } finally {
        statement.close();
    }
    return affected;
}
 
开发者ID:Raizlabs,项目名称:DBFlow,代码行数:17,代码来源:BaseModelQueriable.java

示例2: compileStatement

import com.raizlabs.android.dbflow.structure.database.DatabaseWrapper; //导入方法依赖的package包/类
@NonNull
@Override
public DatabaseStatement compileStatement(@NonNull DatabaseWrapper databaseWrapper) {
    String query = getQuery();
    FlowLog.log(FlowLog.Level.V, "Compiling Query Into Statement: " + query);
    return new DatabaseStatementWrapper<>(databaseWrapper.compileStatement(query), this);
}
 
开发者ID:Raizlabs,项目名称:DBFlow,代码行数:8,代码来源:BaseQueriable.java

示例3: longForQuery

import com.raizlabs.android.dbflow.structure.database.DatabaseWrapper; //导入方法依赖的package包/类
public static long longForQuery(@NonNull DatabaseWrapper wrapper,
                                @NonNull String query) {
    DatabaseStatement statement = wrapper.compileStatement(query);
    try {
        return statement.simpleQueryForLong();
    } finally {
        statement.close();
    }
}
 
开发者ID:Raizlabs,项目名称:DBFlow,代码行数:10,代码来源:SqlUtils.java

示例4: doubleForQuery

import com.raizlabs.android.dbflow.structure.database.DatabaseWrapper; //导入方法依赖的package包/类
public static double doubleForQuery(@NonNull DatabaseWrapper wrapper,
                                    @NonNull String query) {
    DatabaseStatement statement = wrapper.compileStatement(query);
    try {
        return statement.simpleQueryForLong();
    } finally {
        statement.close();
    }
}
 
开发者ID:Raizlabs,项目名称:DBFlow,代码行数:10,代码来源:SqlUtils.java

示例5: getInsertStatement

import com.raizlabs.android.dbflow.structure.database.DatabaseWrapper; //导入方法依赖的package包/类
/**
 * @param databaseWrapper The database used to do an insert statement.
 * @return a new compiled {@link DatabaseStatement} representing insert. Not cached, always generated.
 * To bind values use {@link #bindToInsertStatement(DatabaseStatement, Object)}.
 */
@NonNull
public DatabaseStatement getInsertStatement(@NonNull DatabaseWrapper databaseWrapper) {
    return databaseWrapper.compileStatement(getInsertStatementQuery());
}
 
开发者ID:Raizlabs,项目名称:DBFlow,代码行数:10,代码来源:ModelAdapter.java

示例6: getUpdateStatement

import com.raizlabs.android.dbflow.structure.database.DatabaseWrapper; //导入方法依赖的package包/类
/**
 * @param databaseWrapper The database used to do an update statement.
 * @return a new compiled {@link DatabaseStatement} representing update. Not cached, always generated.
 * To bind values use {@link #bindToUpdateStatement(DatabaseStatement, Object)}.
 */
@NonNull
public DatabaseStatement getUpdateStatement(@NonNull DatabaseWrapper databaseWrapper) {
    return databaseWrapper.compileStatement(getUpdateStatementQuery());
}
 
开发者ID:Raizlabs,项目名称:DBFlow,代码行数:10,代码来源:ModelAdapter.java

示例7: getDeleteStatement

import com.raizlabs.android.dbflow.structure.database.DatabaseWrapper; //导入方法依赖的package包/类
/**
 * @param databaseWrapper The database used to do a delete statement.
 * @return a new compiled {@link DatabaseStatement} representing delete. Not cached, always generated.
 * To bind values use {@link #bindToDeleteStatement(DatabaseStatement, Object)}.
 */
@NonNull
public DatabaseStatement getDeleteStatement(@NonNull DatabaseWrapper databaseWrapper) {
    return databaseWrapper.compileStatement(getDeleteStatementQuery());
}
 
开发者ID:Raizlabs,项目名称:DBFlow,代码行数:10,代码来源:ModelAdapter.java

示例8: getCompiledStatement

import com.raizlabs.android.dbflow.structure.database.DatabaseWrapper; //导入方法依赖的package包/类
/**
 * @param databaseWrapper The database used to do an insert statement.
 * @return a new compiled {@link DatabaseStatement} representing insert.
 * To bind values use {@link #bindToInsertStatement(DatabaseStatement, Object)}.
 */
public DatabaseStatement getCompiledStatement(@NonNull DatabaseWrapper databaseWrapper) {
    return databaseWrapper.compileStatement(getCompiledStatementQuery());
}
 
开发者ID:Raizlabs,项目名称:DBFlow,代码行数:9,代码来源:ModelAdapter.java


注:本文中的com.raizlabs.android.dbflow.structure.database.DatabaseWrapper.compileStatement方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。