當前位置: 首頁>>代碼示例>>Java>>正文


Java SQLiteProgram類代碼示例

本文整理匯總了Java中net.sqlcipher.database.SQLiteProgram的典型用法代碼示例。如果您正苦於以下問題:Java SQLiteProgram類的具體用法?Java SQLiteProgram怎麽用?Java SQLiteProgram使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


SQLiteProgram類屬於net.sqlcipher.database包,在下文中一共展示了SQLiteProgram類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: bindObjectToProgram

import net.sqlcipher.database.SQLiteProgram; //導入依賴的package包/類
/**
 * Binds the given Object to the given SQLiteProgram using the proper
 * typing. For example, bind numbers as longs/doubles, and everything else
 * as a string by call toString() on it.
 *
 * @param prog the program to bind the object to
 * @param index the 1-based index to bind at
 * @param value the value to bind
 */
public static void bindObjectToProgram(SQLiteProgram prog, int index,
        Object value) {
    if (value == null) {
        prog.bindNull(index);
    } else if (value instanceof Double || value instanceof Float) {
        prog.bindDouble(index, ((Number)value).doubleValue());
    } else if (value instanceof Number) {
        prog.bindLong(index, ((Number)value).longValue());
    } else if (value instanceof Boolean) {
        Boolean bool = (Boolean)value;
        if (bool) {
            prog.bindLong(index, 1);
        } else {
            prog.bindLong(index, 0);
        }
    } else if (value instanceof byte[]){
        prog.bindBlob(index, (byte[]) value);
    } else {
        prog.bindString(index, value.toString());
    }
}
 
開發者ID:itsmechlark,項目名稱:greendao-cipher,代碼行數:31,代碼來源:DatabaseUtils.java

示例2: Program

import net.sqlcipher.database.SQLiteProgram; //導入依賴的package包/類
Program(SQLiteProgram delegate) {
  this.delegate=delegate;
}
 
開發者ID:commonsguy,項目名稱:cwac-saferoom,代碼行數:4,代碼來源:Program.java

示例3: SqlCipherProgram

import net.sqlcipher.database.SQLiteProgram; //導入依賴的package包/類
SqlCipherProgram(SQLiteProgram delegate) {
    mDelegate = delegate;
}
 
開發者ID:SelvinPL,項目名稱:SyncFrameworkAndroid,代碼行數:4,代碼來源:SqlCipherProgram.java


注:本文中的net.sqlcipher.database.SQLiteProgram類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。