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


Java SQLiteCursorDriver类代码示例

本文整理汇总了Java中android.database.sqlite.SQLiteCursorDriver的典型用法代码示例。如果您正苦于以下问题:Java SQLiteCursorDriver类的具体用法?Java SQLiteCursorDriver怎么用?Java SQLiteCursorDriver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: newCursor

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public Cursor newCursor(SQLiteDatabase db, SQLiteCursorDriver driver,
                        String editTable, SQLiteQuery query) {

    // Create a standard cursor
    Cursor cursor = new SQLiteCursor(driver, editTable, query);

    // Check if there is an edit table
    if (editTable != null) {
        // Check if the table has a cursor wrapper
        GeoPackageCursorWrapper cursorWrapper = tableCursors.get(editTable);
        if (cursorWrapper != null) {
            cursor = cursorWrapper.wrapCursor(cursor);
        }
    }

    return cursor;
}
 
开发者ID:ngageoint,项目名称:geopackage-android,代码行数:22,代码来源:GeoPackageCursorFactory.java

示例2: openDatabase

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
public SQLiteDatabase openDatabase(final File dbFile) {
    return SQLiteDatabase.openDatabase(dbFile.getAbsolutePath(), new SQLiteDatabase.CursorFactory() {
        @Override
        @SuppressWarnings("deprecation")
        public Cursor newCursor(final SQLiteDatabase db, SQLiteCursorDriver driver, String editTable, SQLiteQuery query) {
            return new SQLiteCursor(db, driver, editTable, query) {
                @Override
                public void close() {
                    Log.d(TAG, "closing cursor");
                    super.close();
                    db.close();
                    if (!dbFile.delete()) {
                        Log.w(TAG, "could not delete database " + dbFile);
                    }
                }
            };
        }
    }, SQLiteDatabase.OPEN_READWRITE);
}
 
开发者ID:jberkel,项目名称:whassup,代码行数:20,代码来源:Whassup.java

示例3: newCursor

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
@Override
public Cursor newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable, SQLiteQuery query) {
  Cursor cursor = CURSOR_FACTORY.newCursor(db, masterQuery, editTable, query);

  long start = System.currentTimeMillis();
  cursor.getCount(); // to fill window
  long end = System.currentTimeMillis();

  long elapsed = end - start;
  if (elapsed > mQueryTimeLimit) {
    // ugly hack warning, the next line depends on current SQLiteQuery implementation:
    String queryString = query.toString().substring("SQLiteQuery: ".length());
    List<String> queryPlan = mQueryPlanGetter.getQueryPlan(db, queryString, editTable);

    dumpIssueReport(queryString, queryPlan, elapsed);
  }

  return cursor;
}
 
开发者ID:chalup,项目名称:cerberus,代码行数:20,代码来源:CerberusCursorFactory.java

示例4: newCursor

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
@Override
public final Cursor newCursor(final SQLiteDatabase pDb,
  final SQLiteCursorDriver pMasterQuery, final String pEditTable,
    final SQLiteQuery pQuery) {
  return new SQLiteCursor(pDb, pMasterQuery, pEditTable, pQuery) {

    @Override
    public boolean requery() {
        setSelectionArguments(new String[] {"2"});
        return super.requery();
    }
  };
}
 
开发者ID:demidenko05,项目名称:beige-software,代码行数:14,代码来源:CursorFactory.java

示例5: select

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
@Override
public SQLiteIterator select() {
    mDb.acquireReference();
    try {
        final SQLiteCursorDriver driver = SQLiteCompat.newDriver(mDb, mSql);
        return new CursorIterator(new SQLiteCursor(driver, null, mQuery));
    } finally {
        mDb.releaseReference();
    }
}
 
开发者ID:DanielSerdyukov,项目名称:alchemy,代码行数:11,代码来源:AndroidQuery.java

示例6: newCursor

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
@Override
public Cursor newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable, SQLiteQuery query) {
    if (FSDBHelper.inst().inDebugMode()) {
        Log.d("forsuredb", "Running query: " + masterQuery.toString());
    }
    return new FSCursor(new SQLiteCursor(masterQuery, editTable, query));
}
 
开发者ID:ryansgot,项目名称:forsuredbandroid,代码行数:8,代码来源:FSCursorFactory.java

示例7: newCursor

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
@Override
public Cursor newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable, SQLiteQuery query) {
    /**
     * {@link SQLiteDatabase} and {@link android.database.sqlite.SQLiteDirectCursorDriver}
     */
    return new AutoCloseCursor(new SQLiteCursor(masterQuery, editTable, query));
}
 
开发者ID:hehonghui,项目名称:simpledb,代码行数:8,代码来源:CloseCursorFactory.java

示例8: newCursor

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
@Override
public Cursor newCursor(SQLiteDatabase sqLiteDatabase, SQLiteCursorDriver sqLiteCursorDriver, String tableName, SQLiteQuery sqLiteQuery) {
    if (isDebugEnabled) {
        QuantumFluxLog.d(sqLiteQuery.toString());
    }

    return new SQLiteCursor(sqLiteCursorDriver, tableName, sqLiteQuery);
}
 
开发者ID:himanshu-soni,项目名称:QuantumFlux,代码行数:9,代码来源:QuantumFluxCursorFactory.java

示例9: rawQuery

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
@Override
public Cursor rawQuery(final SupportSQLiteQuery supportQuery) {
    return rawQueryWithFactory(new SQLiteDatabase.CursorFactory() {
        @Override
        public Cursor newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery,
                                String editTable, SQLiteQuery query) {
            supportQuery.bindTo(new FrameworkSQLiteProgram(query));
            return new SQLiteCursor(masterQuery, editTable, query);
        }
    }, supportQuery.getSql(), EMPTY_STRING_ARRAY, null);
}
 
开发者ID:CaMnter,项目名称:AndroidLife,代码行数:12,代码来源:FrameworkSQLiteDatabase.java

示例10: newCursor

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public Cursor newCursor(SQLiteDatabase sqLiteDatabase,
                        SQLiteCursorDriver sqLiteCursorDriver,
                        String editTable,
                        SQLiteQuery sqLiteQuery) {

    if(Joogar.isDebug()) {
        Joogar.getInstance().getLogger().d(sqLiteQuery.toString());
    }

    return new SQLiteCursor(sqLiteDatabase, sqLiteCursorDriver, editTable, sqLiteQuery);
}
 
开发者ID:skoumalcz,项目名称:joogar,代码行数:13,代码来源:JoogarCursorFactory.java

示例11: newCursor

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
@Override
public Cursor newCursor(SQLiteDatabase sqLiteDatabase, SQLiteCursorDriver sqLiteCursorDriver, String tableName, SQLiteQuery sqLiteQuery) {

    if (debugEnabled) {
        CPOrmLog.d(sqLiteQuery.toString());
    }

    return new SQLiteCursor(sqLiteCursorDriver, tableName, sqLiteQuery);
}
 
开发者ID:Wackymax,项目名称:CPOrm,代码行数:10,代码来源:CPOrmCursorFactory.java

示例12: newCursor

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
@SuppressWarnings("deprecation")
public Cursor newCursor(SQLiteDatabase sqLiteDatabase,
        SQLiteCursorDriver sqLiteCursorDriver,
        String editTable,
        SQLiteQuery sqLiteQuery) {

    if (debugEnabled) {
        Log.d("SQL Log", sqLiteQuery.toString());
    }

    return new SQLiteCursor(sqLiteDatabase, sqLiteCursorDriver, editTable, sqLiteQuery);
}
 
开发者ID:JusticeRage,项目名称:ApkTrack,代码行数:13,代码来源:SugarCursorFactory.java

示例13: newCursor

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
@Override
public Cursor newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery, String editTable, SQLiteQuery query) {
    if (models == null || !models.containsKey(editTable)) {
        return new SQLiteCursor(db, masterQuery, editTable, query);
    } else {
        EncryptedModel model = models.get(editTable);
        return new DecryptingCursor(db, masterQuery, editTable, query, model, getCipherPool());
    }
}
 
开发者ID:dimagi,项目名称:commcare-android,代码行数:10,代码来源:LegacyCommCareDBCursorFactory.java

示例14: newCursor

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
@SuppressWarnings("deprecation")
@Override
public Cursor newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery,
                        String editTable, SQLiteQuery query) {
    LOG.debug(query.toString());

    // non-deprecated API is only available in API 11
    return new SQLiteCursor(db, masterQuery, editTable, query);
}
 
开发者ID:dkharrat,项目名称:NexusData,代码行数:10,代码来源:DatabaseHelper.java

示例15: newCursor

import android.database.sqlite.SQLiteCursorDriver; //导入依赖的package包/类
@Override
public Cursor newCursor(SQLiteDatabase db, SQLiteCursorDriver masterQuery, 
                        String editTable, SQLiteQuery query) {
    if (debugQueries) {
        Log.d("SQL", query.toString());
    }
    return new SQLiteCursor(db, masterQuery, editTable, query);
}
 
开发者ID:museumsvictoria,项目名称:mv-fieldguide-android,代码行数:9,代码来源:FieldGuideDatabase.java


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