本文整理汇总了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;
}
示例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);
}
示例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();
}
}
示例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();
}
}
示例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());
}
示例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());
}
示例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());
}
示例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());
}