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


Java Delete.table方法代码示例

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


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

示例1: addFun_Part

import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
public static void addFun_Part(List<Results> results) {
    Delete.table(PartDbBean.class);
    for (Results result : results) {
        PartDbBean partDbBean = new PartDbBean();
        partDbBean.who = result.getWho();
        partDbBean.publishedAt = result.getPublishedAt();
        partDbBean.desc = result.getDesc();
        partDbBean.type = result.getType();
        partDbBean.url = result.getUrl();
        partDbBean.used = result.getUsed();
        partDbBean.objectId = result.get_id();
        partDbBean.createdAt = result.getCreatedAt();
        partDbBean.save();
    }

}
 
开发者ID:hugeterry,项目名称:coderfun,代码行数:17,代码来源:FunDao.java

示例2: addFun_Girly

import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
public static void addFun_Girly(List<Results> results) {
    Delete.table(GirlyDbBean.class);
    for (Results result : results) {
        GirlyDbBean girlyDbBean = new GirlyDbBean();
        girlyDbBean.who = result.getWho();
        girlyDbBean.publishedAt = result.getPublishedAt();
        girlyDbBean.desc = result.getDesc();
        girlyDbBean.type = result.getType();
        girlyDbBean.url = result.getUrl();
        girlyDbBean.used = result.getUsed();
        girlyDbBean.objectId = result.get_id();
        girlyDbBean.createdAt = result.getCreatedAt();
        girlyDbBean.save();
    }

}
 
开发者ID:hugeterry,项目名称:coderfun,代码行数:17,代码来源:FunDao.java

示例3: addFun_Real

import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
public static void addFun_Real(List<List<Results>> results) {
    Delete.table(RealDbBean.class);
    for (List<Results> result : results) {
        for (int i = 0; i < result.size(); i++) {
            RealDbBean realDbBean = new RealDbBean();
            realDbBean.who = result.get(i).getWho();
            realDbBean.publishedAt = result.get(i).getPublishedAt();
            realDbBean.desc = result.get(i).getDesc();
            realDbBean.type = result.get(i).getType();
            realDbBean.url = result.get(i).getUrl();
            realDbBean.used = result.get(i).getUsed();
            realDbBean.objectId = result.get(i).get_id();
            realDbBean.createdAt = result.get(i).getCreatedAt();
            realDbBean.save();
        }
    }

}
 
开发者ID:hugeterry,项目名称:coderfun,代码行数:19,代码来源:FunDao.java

示例4: clearTable

import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
@OnClick(R.id.btnClearTable)
public void clearTable()
{
    if (radioGroup.getCheckedRadioButtonId() == R.id.radioUser)
    {
        Delete.table(UserModel.class);
        Snackbar.make(layoutMain, "User Table cleared in Database!", Snackbar.LENGTH_SHORT).show();
    }
    else if (radioGroup.getCheckedRadioButtonId() == R.id.radioCompany)
    {
        Delete.table(CompanyModel.class);
        Snackbar.make(layoutMain, "Company Table Cleared in Database!", Snackbar.LENGTH_SHORT).show();
    }
    updateCountText();
}
 
开发者ID:wajahatkarim3,项目名称:DBFlowManager,代码行数:16,代码来源:MainActivity.java

示例5: dropDb

import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
@Override
public long dropDb() throws SQLException {
    long start = System.nanoTime();
    Delete.table(Message.class);
    Delete.table(User.class);
    return System.nanoTime() - start;
}
 
开发者ID:touchlab,项目名称:android-orm-benchmark-updated,代码行数:8,代码来源:DBFlowExecutor.java

示例6: indexedStringEntityQueriesRun

import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
private void indexedStringEntityQueriesRun(int count) {
    // create entities
    List<IndexedStringEntity> entities = new ArrayList<>(count);
    String[] fixedRandomStrings = StringGenerator.createFixedRandomStrings(count);
    for (int i = 0; i < count; i++) {
        IndexedStringEntity entity = new IndexedStringEntity();
        entity._id = (long) i;
        entity.indexedString = fixedRandomStrings[i];
        entities.add(entity);
    }
    log("Built entities.");

    // insert entities
    FlowManager.getDatabase(FlowDatabase.class).executeTransaction(insertTransaction(entities, IndexedStringEntity.class));

    log("Inserted entities.");

    // query for entities by indexed string at random
    int[] randomIndices = StringGenerator.getFixedRandomIndices(getQueryCount(), count - 1);

    startClock();
    for (int i = 0; i < getQueryCount(); i++) {
        int nextIndex = randomIndices[i];

        //noinspection unused
        IndexedStringEntity indexedStringEntity = SQLite.select()
                .from(IndexedStringEntity.class)
                .where(IndexedStringEntity_Table.indexedString.eq(
                        fixedRandomStrings[nextIndex]))
                .querySingle();
    }
    stopClock(Benchmark.Type.QUERY_INDEXED);

    // delete all entities
    Delete.table(IndexedStringEntity.class);
    log("Deleted all entities.");
}
 
开发者ID:greenrobot,项目名称:android-database-performance,代码行数:38,代码来源:PerfTestDbFlow.java

示例7: clear

import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
@Override
public void clear() {
    Delete.table(Repo.class);
}
 
开发者ID:Egorand,项目名称:intro-to-rxjava-rxandroid,代码行数:5,代码来源:ReposDiskDatastore.java

示例8: deleteAll

import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
private void deleteAll() {
    Delete.table(SimpleEntityNotNull.class);
}
 
开发者ID:greenrobot,项目名称:android-database-performance,代码行数:4,代码来源:PerfTestDbFlow.java

示例9: clearTable

import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
public static void clearTable() {
    Delete.table(Produce.class);
}
 
开发者ID:jarvislin,项目名称:Produce-Price-Checker,代码行数:4,代码来源:DatabaseController.java

示例10: clearPendingPlaybackItems

import com.raizlabs.android.dbflow.sql.language.Delete; //导入方法依赖的package包/类
/**
 * Clears all {@link PlaybackItem}s from the database. This method should be called when pending
 * items have been queued for re-submission.
 */
public void clearPendingPlaybackItems() {
  Delete.table(PendingPlaybackItemEntry.class);
}
 
开发者ID:peterjosling,项目名称:scroball,代码行数:8,代码来源:ScroballDB.java


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