Comments (3)
It's a long story. Has this affected you in any way?
from wcdb.
对的,因为我这边升级WCDBOptimizedSQLCipher后出了个问题: 因为SQL语句中的参数过多导致执行失败, 出错代码如下:
NSMutableArray<NSString *> *binds = @{}.mutableCopy;
NSUInteger count = nameIDs.count;// count数量为200
for (NSUInteger index = 0; index < count; index++ ) {
[binds addObject:@"?"];
}
NSString *sql = [NSString stringWithFormat:@"DELETE FROM %@ WHERE name_id IN (%@);", tableName, [binds componentsJoinedByString:@","]];
FMDatabase *db = self.database;
NSError *error = nil;
[db executeUpdate:sql values:trackIDs error:&error];
然后我修复了这个参数过多导致SQL语句执行失败的问题(不使用 ? 代替in后面的内容),修复代码如下:
NSString *sql =[NSString stringWithFormat:@"DELETE FROM %@ WHERE name_id IN ( '%@' );", tableName, [nameIDs componentsJoinedByString:@"','"]];
但是因为我的项目中代码量很大,不确定其他地方是否会有类似问题 && 难以确保后面其他研发是否会这样裸用sql,
所以我这边计划把WCDBOptimizedSQLCipher的podspec中的SQLITE_MAX_VARIABLE_NUMBER=99这句干掉。
可我又不确定把这个宏干掉后,会不会导致WCDB、WCDBOptimizedSQLCipher这两个SDK出现其他问题,所以才会有本次提问的问题
from wcdb.
If you don't use the data migration feature in WCDB, this will not have a negative impact.
from wcdb.
Related Issues (20)
- new java version... HOT 1
- 什么时候支持arkTs? HOT 2
- Use of undeclared identifier 'WCDB_VERSION_STRING' HOT 1
- Use of undeclared identifier 'WCDB_VERSION_STRING' HOT 2
- 源码引入,release环境报错:umbrella header 'WCDBBridging.h' not found HOT 3
- disk I/O 错误;wal 和 shm文件未回收
- [ERROR] Code:IOError when exec(StatementVacuum().vacuum()) HOT 3
- 求好心人提供一个WCDB.swift的多表查询Demo HOT 1
- wcdbswift left join 如何实现? HOT 1
- WCDB.swift会考虑支持Swift package manager吗? HOT 2
- OC 版本 现在distinct 怎么用? HOT 1
- ThreadLocal crash HOT 4
- 微信的Swift开发 HOT 1
- Pods/WCDB.objc/src/common/core/sqlite/HandleNotification.cpp:247:9: No matching function for call to 'sqlite3_wal_checkpoint_handler' HOT 3
- linker command failed with exit code 1
- Roadmap for Java or Kotlin? HOT 7
- XCode15.2可编译,但是打包会报错未找到sqlcipher HOT 1
- flus all data to .db file HOT 1
- Privacy Manifes HOT 1
- XCode Swift Package Manager安装后,真机运行会崩溃 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wcdb.