这篇教程C++ sqlite3_clear_bindings函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中sqlite3_clear_bindings函数的典型用法代码示例。如果您正苦于以下问题:C++ sqlite3_clear_bindings函数的具体用法?C++ sqlite3_clear_bindings怎么用?C++ sqlite3_clear_bindings使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了sqlite3_clear_bindings函数的25个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: native_clear_bindingsstatic void native_clear_bindings(JNIEnv* env, jobject object){ int err; sqlite3_stmt * statement = GET_STATEMENT(env, object); err = sqlite3_clear_bindings(statement); if (err != SQLITE_OK) { throw_sqlite3_exception(env, GET_HANDLE(env, object)); return; }}
开发者ID:274737258,项目名称:android-sqlite-encrypt,代码行数:11,
示例2: sqlite3_resetbool Object::findObjects(int frameID){ sqlite3_reset(m_findObjectsByFrameID); sqlite3_clear_bindings(m_findObjectsByFrameID); sqlite3_bind_int(m_findObjectsByFrameID, 1, frameID); m_currentSelect = m_findObjectsByFrameID; return true;}
开发者ID:dupes,项目名称:carp,代码行数:11,
示例3: sqlite3_clear_bindingsvoid statement_imp::do_uses(){ Error error = detail::sqliteError(__FILE__, __LINE__, sqlite3_clear_bindings (m_stmt)); if (error) Throw (error); for (uses_t::iterator iter = m_uses.begin (); iter != m_uses.end (); ++iter) (*iter)->do_use();}
开发者ID:Izhaki,项目名称:LayerEffects,代码行数:11,
示例4: ID/* Looks in the db for the tag ID (given) Returns 1 if it finds the tag UID in the db Returns 0 if it doesn't find the tag in the db Returns -1 if there is an error*/inttouchatag_taglist_sqlite3_search_from_uid (char *tag_uid){ sqlite3_stmt *pStmt; sqlite3 *database; int rc, i = 0, b; if ((rc = sqlite3_open (dbname, &database)) != SQLITE_OK){ printf ("Error sqlite3_open ()/n"); return -1; } if ((rc = sqlite3_prepare_v2 (database, "SELECT * FROM tag WHERE UID=?", -1, &pStmt, NULL)) != SQLITE_OK){ printf("Error prepare_v2 #1 search/n"); return -1; } if ((rc = sqlite3_bind_text (pStmt, 1, tag_uid, -1, NULL)) != SQLITE_OK){ printf ("Error sqlite3_bind_text () in touchatag_taglist_sqlite3_search/n"); return -1; } if ((rc = sqlite3_step (pStmt)) != SQLITE_ROW){ i = sqlite3_clear_bindings (pStmt); if ((rc = sqlite3_reset (pStmt)) != SQLITE_OK){ printf ("Error sqlite3_reset () in touchatag_taglist_sqlite3_search/n"); return -1; } return 0; } i=sqlite3_clear_bindings (pStmt); if ((rc = sqlite3_reset (pStmt))!= SQLITE_OK){ printf ("Error sqlite3_reset () in touchatag_taglist_sqlite3_search/n"); return -1; } return 1;}
开发者ID:andypc,项目名称:lib-touchatag-1.0,代码行数:47,
示例5: bool DB::Bindings::clear(){ if (!isValid()) { DB::logError("Bindings::clear: statement is not valid"); return false; } if (sqlite3_clear_bindings(_handle->_stmt) != SQLITE_OK) { reportError(_handle->_stmt); return false; } return true;}
开发者ID:GarysRefererence2014,项目名称:SoftHSMv2,代码行数:12,
示例6: hdb_sqlite_step_once/** * Convenience function to step a prepared statement with no * value once. * * @param context The current krb5_context * @param statement A prepared sqlite3 statement * * @return 0 if everything worked, an error code if not */static krb5_error_codehdb_sqlite_step_once(krb5_context context, HDB *db, sqlite3_stmt *statement){ int ret; hdb_sqlite_db *hsdb = (hdb_sqlite_db *) db->hdb_db; ret = hdb_sqlite_step(context, hsdb->db, statement); sqlite3_clear_bindings(statement); sqlite3_reset(statement); return ret;}
开发者ID:SimonWilkinson,项目名称:heimdal,代码行数:21,
示例7: Java_com_almworks_sqlite4java__1SQLiteSwiggedJNI_sqlite3_1clear_1bindingsSWIGEXPORT jint JNICALL Java_com_almworks_sqlite4java__1SQLiteSwiggedJNI_sqlite3_1clear_1bindings(JNIEnv *jenv, jclass jcls, jlong jarg1) { jint jresult = 0 ; sqlite3_stmt *arg1 = (sqlite3_stmt *) 0 ; int result; (void)jenv; (void)jcls; arg1 = *(sqlite3_stmt **)&jarg1; result = (int)sqlite3_clear_bindings(arg1); jresult = (jint)result; return jresult;}
开发者ID:SpatialInteractive,项目名称:sqlite4java-custom,代码行数:12,
示例8: sec_sqlite3_resetstatic int sec_sqlite3_reset(sqlite3_stmt *stmt, int s3e) { int s3e2; if (s3e == SQLITE_ROW || s3e == SQLITE_DONE) s3e = SQLITE_OK; s3e2 = sqlite3_reset(stmt); if (s3e2 && !s3e) s3e = s3e2; s3e2 = sqlite3_clear_bindings(stmt); if (s3e2 && !s3e) s3e = s3e2; return s3e;}
开发者ID:Apple-FOSS-Mirror,项目名称:Security,代码行数:12,
示例9: QStringvoid QgsOSMDatabase::exportSpatiaLiteNodes( const QString& tableName, const QStringList& tagKeys ){ QString sqlInsertPoint = QString( "INSERT INTO %1 VALUES (?" ).arg( quotedIdentifier( tableName ) ); for ( int i = 0; i < tagKeys.count(); ++i ) sqlInsertPoint += QString( ",?" ); sqlInsertPoint += ", GeomFromWKB(?, 4326))"; sqlite3_stmt* stmtInsert; if ( sqlite3_prepare_v2( mDatabase, sqlInsertPoint.toUtf8().constData(), -1, &stmtInsert, 0 ) != SQLITE_OK ) { mError = "Prepare SELECT FROM nodes failed."; return; } QgsOSMNodeIterator nodes = listNodes(); QgsOSMNode n; while (( n = nodes.next() ).isValid() ) { QgsOSMTags t = tags( false, n.id() ); // skip untagged nodes: probably they form a part of ways if ( t.count() == 0 ) continue; QgsGeometry* geom = QgsGeometry::fromPoint( n.point() ); int col = 0; sqlite3_bind_int64( stmtInsert, ++col, n.id() ); // tags for ( int i = 0; i < tagKeys.count(); ++i ) { if ( t.contains( tagKeys[i] ) ) sqlite3_bind_text( stmtInsert, ++col, t.value( tagKeys[i] ).toUtf8().constData(), -1, SQLITE_TRANSIENT ); else sqlite3_bind_null( stmtInsert, ++col ); } sqlite3_bind_blob( stmtInsert, ++col, geom->asWkb(), geom->wkbSize(), SQLITE_STATIC ); int insertRes = sqlite3_step( stmtInsert ); if ( insertRes != SQLITE_DONE ) { mError = QString( "Error inserting node %1 [%2]" ).arg( n.id() ).arg( insertRes ); break; } sqlite3_reset( stmtInsert ); sqlite3_clear_bindings( stmtInsert ); delete geom; } sqlite3_finalize( stmtInsert );}
开发者ID:Adam-Brown,项目名称:Quantum-GIS,代码行数:52,
示例10: nativeResetStatementAndClearBindingsstatic void nativeResetStatementAndClearBindings(JNIEnv* env, jclass clazz, jlong connectionPtr, jlong statementPtr) { SQLiteConnection* connection = reinterpret_cast<SQLiteConnection*>(connectionPtr); sqlite3_stmt* statement = reinterpret_cast<sqlite3_stmt*>(statementPtr); int err = sqlite3_reset(statement); if (err == SQLITE_OK) { err = sqlite3_clear_bindings(statement); } if (err != SQLITE_OK) { throw_sqlite3_exception(env, connection->db, NULL); }}
开发者ID:yuzhiyun,项目名称:platform_frameworks_base,代码行数:13,
示例11: gst_sqlite3_clear_bindingsstatic int gst_sqlite3_clear_bindings (OOP self) { sqlite3_stmt *stmt; SQLite3StmtHandle h; h = (SQLite3StmtHandle) OOP_TO_OBJ (self); if (h->stmt == vmProxy->nilOOP) return SQLITE_MISUSE; stmt = (sqlite3_stmt *) vmProxy->OOPToCObject (h->stmt); return sqlite3_clear_bindings (stmt); }
开发者ID:MrVertinskis,项目名称:smalltalk,代码行数:13,
示例12: dec_positions/** * Decrements the positions of contiguous services by one. * * @param [in] sl the service list to be modified. * @param [in] from the first position in the range. * @param [in] to the last position in the range. * * @return 0 if there is no error or non-zero if there is an error. */static intdec_positions (service_list *sl, int from, int to){ int i; int rc; if ((rc = ensure_inc_dec_pos (sl))) { l->APP_ERR (rc, "inc_dec_pos is unavailable"); return ERR_DEC_POS; } if (sqlite3_reset (sl->inc_dec_pos)) { SQLITE3_ERR (sl->db, "Cannot reset inc_dec_pos"); return ERR_DEC_POS; } if (sqlite3_clear_bindings (sl->inc_dec_pos)) { SQLITE3_ERR (sl->db, "Cannot clear inc_dec_pos bindings"); return ERR_DEC_POS; } if (sqlite3_bind_int (sl->inc_dec_pos, 1, -1)) { SQLITE3_ERR (sl->db, "Cannot bind -1 to inc_dec_pos"); return ERR_DEC_POS; } for (i = from; i <= to; i++) { if (sqlite3_bind_int (sl->inc_dec_pos, 2, i)) { SQLITE3_ERR (sl->db, "Cannot bind pos #%d to inc_dec_pos", i); return ERR_DEC_POS; } if (sqlite3_step (sl->inc_dec_pos) != SQLITE_DONE) { SQLITE3_ERR (sl->db, "Cannot execute inc_dec_pos #%d", i); return ERR_DEC_POS; } if (sqlite3_reset (sl->inc_dec_pos)) { SQLITE3_ERR (sl->db, "Cannot reset inc_dec_pos #%d", i); return ERR_DEC_POS; } } return ERR_SUCCESS;}
开发者ID:eus,项目名称:service_publishing_ap,代码行数:59,
示例13: md_sqlite_execute_insertstatic int32_t md_sqlite_execute_insert(struct md_writer_sqlite *mws, struct md_conn_event *mce){ int32_t retval; sqlite3_stmt *stmt = mws->insert_event; sqlite3_clear_bindings(stmt); sqlite3_reset(stmt); if (sqlite3_bind_int(stmt, 1, mws->node_id) || sqlite3_bind_int64(stmt, 2, mws->session_id) || sqlite3_bind_int64(stmt, 3, mws->session_id_multip) || sqlite3_bind_int64(stmt, 4, mce->tstamp) || sqlite3_bind_int(stmt, 5, mce->sequence) || sqlite3_bind_int(stmt, 6, mce->l3_session_id) || sqlite3_bind_int(stmt, 7, mce->l4_session_id) || sqlite3_bind_int(stmt, 8, mce->event_type) || sqlite3_bind_int(stmt, 9, mce->event_param) || sqlite3_bind_int(stmt, 12, mce->interface_type) || sqlite3_bind_int(stmt, 13, mce->interface_id_type) || sqlite3_bind_text(stmt, 14, mce->interface_id, strlen(mce->interface_id), SQLITE_STATIC) || sqlite3_bind_int(stmt, 16, mce->network_address_family) || sqlite3_bind_text(stmt, 17, mce->network_address, strlen(mce->network_address), SQLITE_STATIC)) { META_PRINT_SYSLOG(mws->parent, LOG_ERR, "Failed to bind values to INSERT query/n"); return SQLITE_ERROR; } if (mce->event_value != UINT8_MAX && sqlite3_bind_int(stmt, 10, mce->event_value)) { META_PRINT_SYSLOG(mws->parent, LOG_ERR, "Failed bind event value (int)/n"); return SQLITE_ERROR; } if (mce->event_value_str != NULL && sqlite3_bind_text(stmt, 11, mce->event_value_str, strlen(mce->event_value_str), SQLITE_STATIC)) { META_PRINT_SYSLOG(mws->parent, LOG_ERR, "Failed to bind event value (string)/n"); return SQLITE_ERROR; } if (mce->network_provider) { retval = sqlite3_bind_int(stmt, 15, mce->network_provider); if (retval) { META_PRINT_SYSLOG(mws->parent, LOG_ERR, "Failed to bind provider to INSERT query/n"); return SQLITE_ERROR; } } return sqlite3_step(stmt);}
开发者ID:relet,项目名称:data-exporter,代码行数:50,
示例14: gbDB_ExecSQL_Scalar_ReusingStmtint gbDB_ExecSQL_Scalar_ReusingStmt(sqlite3_stmt* scalar_stmt){ int rowCount = 0; while(sqlite3_step(scalar_stmt) == SQLITE_ROW) { rowCount = sqlite3_column_int(scalar_stmt, 0); }//while sqlite3_clear_bindings(scalar_stmt); sqlite3_reset(scalar_stmt); return rowCount;}//gbDB_ExecSQL_Scalar_ReusingStmt
开发者ID:Safecast,项目名称:General,代码行数:14,
示例15: SqResultsbool SqQuery::Execute(){ int rc; /* If we don't have a result set and we have a column count, * create a result set pre-emptively. This is in case there * are no rows in the upcoming result set. */ if (!m_pResults && m_ColCount) { m_pResults = new SqResults(this); } /* If we've got results, throw them away */ if (m_pResults) { m_pResults->ResetResultCount(); } /* Fetch each row, if any */ while ((rc = sqlite3_step(m_pStmt)) == SQLITE_ROW) { /* This should NEVER happen but we're being safe. */ if (!m_pResults) { m_pResults = new SqResults(this); } m_pResults->PushResult(); } sqlite3 *db = m_pParent->GetDb(); if (rc != SQLITE_OK && rc != SQLITE_DONE && rc == sqlite3_errcode(db)) { /* Something happened... */ m_LastErrorCode = rc; m_LastError.assign(sqlite3_errmsg(db)); m_AffectedRows = 0; m_InsertID = 0; } else { m_LastErrorCode = SQLITE_OK; m_AffectedRows = (unsigned int)sqlite3_changes(db); m_InsertID = (unsigned int)sqlite3_last_insert_rowid(db); } /* Reset everything for the next execute */ sqlite3_reset(m_pStmt); sqlite3_clear_bindings(m_pStmt); return (m_LastErrorCode == SQLITE_OK);}
开发者ID:Nephyrin,项目名称:-furry-octo-nemesis,代码行数:50,
示例16: he_item_db_insertvoid he_item_db_insert(struct lt_db_t * db, he_item_t * item) { int status = 0; sqlite3_clear_bindings(db->he_item_insert); sqlite3_bind_int(db->he_item_insert, 1, item->id); sqlite3_bind_text(db->he_item_insert, 2, item->aegis, strlen(item->aegis), SQLITE_STATIC); sqlite3_bind_text(db->he_item_insert, 3, item->name, strlen(item->name), SQLITE_STATIC); sqlite3_bind_int(db->he_item_insert, 4, item->type); sqlite3_bind_int(db->he_item_insert, 5, item->buy); sqlite3_bind_int(db->he_item_insert, 6, item->sell); sqlite3_bind_int(db->he_item_insert, 7, item->weight); sqlite3_bind_int(db->he_item_insert, 8, item->atk); sqlite3_bind_int(db->he_item_insert, 9, item->matk); sqlite3_bind_int(db->he_item_insert, 10, item->def); sqlite3_bind_int(db->he_item_insert, 11, item->range); sqlite3_bind_int(db->he_item_insert, 12, item->slots); sqlite3_bind_int(db->he_item_insert, 13, item->job); sqlite3_bind_int(db->he_item_insert, 14, item->upper); sqlite3_bind_int(db->he_item_insert, 15, item->gender); sqlite3_bind_int(db->he_item_insert, 16, item->loc); sqlite3_bind_int(db->he_item_insert, 17, item->weaponlv); sqlite3_bind_int(db->he_item_insert, 18, item->equiplv[EQUIP_MIN]); sqlite3_bind_int(db->he_item_insert, 19, item->equiplv[EQUIP_MAX]); sqlite3_bind_int(db->he_item_insert, 20, item->refine); sqlite3_bind_int(db->he_item_insert, 21, item->view); sqlite3_bind_int(db->he_item_insert, 22, item->bindonequip); sqlite3_bind_int(db->he_item_insert, 23, item->buyingstore); sqlite3_bind_int(db->he_item_insert, 24, item->delay); sqlite3_bind_int(db->he_item_insert, 25, item->trade[TRADE_OVERRIDE]); sqlite3_bind_int(db->he_item_insert, 26, item->trade[TRADE_NODROP]); sqlite3_bind_int(db->he_item_insert, 27, item->trade[TRADE_NOTRADE]); sqlite3_bind_int(db->he_item_insert, 28, item->trade[TRADE_PARTNEROVERRIDE]); sqlite3_bind_int(db->he_item_insert, 29, item->trade[TRADE_NOSELLTONPC]); sqlite3_bind_int(db->he_item_insert, 30, item->trade[TRADE_NOCART]); sqlite3_bind_int(db->he_item_insert, 31, item->trade[TRADE_NOSTORAGE]); sqlite3_bind_int(db->he_item_insert, 32, item->trade[TRADE_NOGSTORAGE]); sqlite3_bind_int(db->he_item_insert, 33, item->trade[TRADE_NOMAIL]); sqlite3_bind_int(db->he_item_insert, 34, item->trade[TRADE_NOAUCTION]); sqlite3_bind_int(db->he_item_insert, 35, item->nouse[NOUSE_OVERRIDE]); sqlite3_bind_int(db->he_item_insert, 36, item->nouse[NOUSE_SITTING]); sqlite3_bind_int(db->he_item_insert, 37, item->stack[STACK_AMOUNT]); sqlite3_bind_int(db->he_item_insert, 38, item->stack[STACK_TYPE]); sqlite3_bind_int(db->he_item_insert, 39, item->sprite); sqlite3_bind_text(db->he_item_insert, 40, item->script, strlen(item->script), SQLITE_STATIC); sqlite3_bind_text(db->he_item_insert, 41, item->onequipscript, strlen(item->onequipscript), SQLITE_STATIC); sqlite3_bind_text(db->he_item_insert, 42, item->onunequipscript, strlen(item->onunequipscript), SQLITE_STATIC); status = sqlite3_step(db->he_item_insert); /*if(status != SQLITE_DONE) exit_abt("fatal error inserting item.");*/ sqlite3_reset(db->he_item_insert);}
开发者ID:cydh,项目名称:eAdb.Compiler3,代码行数:49,
示例17: _record_meta1refstatic GError *_record_meta1ref(sqlite3 *db, const GPtrArray *new_assign_meta1ref){ GError *err = NULL; gint rc; guint idx; sqlite3_stmt *stmt = NULL; sqlite3_prepare_debug(rc, db, "REPLACE INTO meta1_ref" " (addr,state,prefixes) VALUES (?,?,?)", -1, &stmt, NULL); if (rc != SQLITE_OK && rc != SQLITE_DONE) { if ( rc == SQLITE_ERROR ) { GRID_DEBUG("Missing table meta1ref in DB"); return NULL; } return SQLITE_GERROR(db, rc); } for (idx=0; idx < new_assign_meta1ref->len; idx++) { gchar *m1ref = new_assign_meta1ref->pdata[idx]; gchar *addr, *ref, *nb; if ( ! meta0_utils_unpack_meta1ref(m1ref,&addr,&ref,&nb) ) continue; sqlite3_reset(stmt); sqlite3_clear_bindings(stmt); sqlite3_bind_text(stmt, 1, addr, -1, NULL); sqlite3_bind_text(stmt, 2, ref, -1, NULL); sqlite3_bind_text(stmt, 3, nb, -1, NULL); while (!err) { rc = sqlite3_step(stmt); if (rc == SQLITE_OK || rc == SQLITE_DONE) break; if (rc == SQLITE_BUSY) sleep(1); else err = SQLITE_GERROR(db, rc); } if (addr) g_free(addr); if (ref) g_free(ref); if (nb) g_free(nb); } sqlite3_finalize_debug(rc, stmt); return err;}
开发者ID:dibaggioj,项目名称:oio-sds,代码行数:49,
示例18: kv_keyexistsint kv_keyexists(void * obj, const char * k){ sqlite3 * db = (sqlite3 *)obj; static const char * query = "SELECT count(*) FROM keyvaluestore WHERE k = ?"; static sqlite3_stmt * stmt = 0; static sqlite3 * lastdb = 0; if(!stmt || db != lastdb){ if(stmt){ sqlite3_finalize(stmt); stmt = 0; } if(sqlite3_prepare_v2(db, query, -1, &stmt, 0) != SQLITE_OK){ fprintf(stderr, "/nerror: %s", sqlite3_errmsg(db)); sqlite3_finalize(stmt); stmt = 0; assert(0); return 0; } lastdb = db; } int retval = 0; sqlite3_bind_text(stmt, 1, k, -1, SQLITE_STATIC); int status = sqlite3_step(stmt); if(status == SQLITE_ROW){ int count = sqlite3_column_int(stmt, 0); assert(count == 0 || count == 1); retval = count; } else{ assert(0); } sqlite3_clear_bindings(stmt); sqlite3_reset(stmt); return retval;}
开发者ID:derekmc,项目名称:Generic-Keyvalue-Datastore,代码行数:49,
示例19: database_resetStatement// reset statementvoid database_resetStatement ( sqlite3_stmt * pStatement ){ int status; status = sqlite3_reset ( pStatement ); if ( SQLITE_OK != status ) { fatalError ( "Error reseting SQL statement!", 1 ); } status = sqlite3_clear_bindings ( pStatement ); if ( SQLITE_OK != status ) { fatalError ( "Error clearing SQL statement bindings!", 1 ); }}
开发者ID:sgeos,项目名称:SimpleClient,代码行数:16,
示例20: prv_existsstatic int prv_exists(dmsettings *handle, const char *key, bool *exists){ DMC_ERR_MANAGE; DMC_FAIL(prv_bind_double_query(handle->stmt_exists, key, key)); *exists = sqlite3_column_int(handle->stmt_exists, 0) ? true : false;DMC_ON_ERR: sqlite3_reset(handle->stmt_exists); sqlite3_clear_bindings(handle->stmt_exists); return DMC_ERR;}
开发者ID:steveyook,项目名称:libdmclient,代码行数:15,
示例21: sqlite3_step void RSSManager::markAllAsRead(int feedid) { if (feedid == 0) { sqlite3_step(markAllReadStmt); sqlite3_reset(markAllReadStmt); } else { sqlite3_clear_bindings(markAllFeedReadStmt); sqlite3_bind_int(markAllFeedReadStmt, 1, feedid); int rc = sqlite3_step(markAllFeedReadStmt); sqlite3_reset(markAllFeedReadStmt); } }
开发者ID:tian1107,项目名称:anteRSS,代码行数:15,
示例22: pk_backend_download_packages_threadstatic void pk_backend_download_packages_thread(PkBackendJob *job, GVariant *params, gpointer user_data) { gchar *dir_path, *path, **pkg_ids, **pkg_tokens, *to_strv[] = {NULL, NULL}; guint i; GSList *repo; sqlite3_stmt *stmt; PkBackendKatjaJobData *job_data = pk_backend_job_get_user_data(job); g_variant_get(params, "(^a&ss)", &pkg_ids, &dir_path); pk_backend_job_set_status (job, PK_STATUS_ENUM_DOWNLOAD); if ((sqlite3_prepare_v2(job_data->db, "SELECT summary, (full_name || '.' || ext) FROM pkglist NATURAL JOIN repos " "WHERE name LIKE @name AND ver LIKE @ver AND arch LIKE @arch AND repo LIKE @repo", -1, &stmt, NULL) != SQLITE_OK)) { pk_backend_job_error_code(job, PK_ERROR_ENUM_CANNOT_GET_FILELIST, "%s", sqlite3_errmsg(job_data->db)); goto out; } for (i = 0; pkg_ids[i]; i++) { pkg_tokens = pk_package_id_split(pkg_ids[i]); sqlite3_bind_text(stmt, 1, pkg_tokens[PK_PACKAGE_ID_NAME], -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 2, pkg_tokens[PK_PACKAGE_ID_VERSION], -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 3, pkg_tokens[PK_PACKAGE_ID_ARCH], -1, SQLITE_TRANSIENT); sqlite3_bind_text(stmt, 4, pkg_tokens[PK_PACKAGE_ID_DATA], -1, SQLITE_TRANSIENT); if (sqlite3_step(stmt) == SQLITE_ROW) { if ((repo = g_slist_find_custom(repos, pkg_tokens[PK_PACKAGE_ID_DATA], katja_cmp_repo))) { pk_backend_job_package(job, PK_INFO_ENUM_DOWNLOADING, pkg_ids[i], (gchar *) sqlite3_column_text(stmt, 0)); katja_pkgtools_download(KATJA_PKGTOOLS(repo->data), job, dir_path, pkg_tokens[PK_PACKAGE_ID_NAME]); path = g_build_filename(dir_path, (gchar *) sqlite3_column_text(stmt, 1), NULL); to_strv[0] = path; pk_backend_job_files(job, NULL, to_strv); g_free(path); } } sqlite3_clear_bindings(stmt); sqlite3_reset(stmt); g_strfreev(pkg_tokens); }out: sqlite3_finalize(stmt); pk_backend_job_finished (job);}
开发者ID:Distrotech,项目名称:packagekit,代码行数:48,
示例23: sqlite3_reset bool Statement::Reset() { int Err = sqlite3_reset(Inner); if (Err != SQLITE_OK) { LogError("Failed to reset statement."); return LogError(sqlite3_errstr(Err), false); } Err = sqlite3_clear_bindings(Inner); if (Err != SQLITE_OK) { LogError("Failed to clear bindings."); return LogError(sqlite3_errstr(Err), false); } return true; }
开发者ID:hnefatl,项目名称:Chatroom,代码行数:16,
示例24: getSqlite3void Database::Query::reset(){ sqlite3* db = getSqlite3(); if (db == NULL) return; int err; err = sqlite3_clear_bindings(_stmt); if (err) NIT_THROW_FMT(EX_DATABASE, "can't clear binding: %s", sqlite3_errmsg(db)); err = sqlite3_reset(_stmt); if (err) NIT_THROW_FMT(EX_DATABASE, "can't reset statement: %s", sqlite3_errmsg(db)); _stepResult = SQLITE_DONE;}
开发者ID:noriter,项目名称:nit,代码行数:16,
示例25: lms_db_reset_stmtintlms_db_reset_stmt(sqlite3_stmt *stmt){ int r, ret; ret = r = sqlite3_reset(stmt); if (r != SQLITE_OK) fprintf(stderr, "ERROR: could not reset SQL statement: #%d/n", r); r = sqlite3_clear_bindings(stmt); ret += r; if (r != SQLITE_OK) fprintf(stderr, "ERROR: could not clear SQL: #%d/n", r); return ret;}
开发者ID:arthurfait,项目名称:lightmediascanner,代码行数:16,
注:本文中的sqlite3_clear_bindings函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ sqlite3_close函数代码示例 C++ sqlite3_changes函数代码示例 |