加密核心数据的SQLite语法错误

时间:2014-10-17 13:27:01

标签: ios objective-c sqlite core-data encrypted-core-data-sql

我已经在很长一段时间内遇到语法错误,我不确定是什么原因造成的。调试日志如下:

SQL DEBUG: SELECT ecdImages.checkSum, ecdImages.creationDate, ecdImages.filename, ecdImages.height, ecdImages.latitude, ecdImages.locationString, ecdImages.longitude, ecdImages.order, ecdImages.photoId, ecdImages.photoLogValues, ecdImages.requiresDeletion, ecdImages.requiresUpload, ecdImages.rotationAngle, ecdImages.scale, ecdImages.source, ecdImages.timestamp, ecdImages.title, ecdImages.transform, ecdImages.width, ecdImages.x, ecdImages.y, ecdImages.book__objectid, ecdImages.page__objectid FROM ecdImages WHERE ecdImages.__objectid=?;

could not prepare statement: near "order": syntax error

订单的类型为Integer 16,供您参考,我目前正在使用github上的Encrypted-Core-Data。有什么想法吗?

1 个答案:

答案 0 :(得分:0)

正如CL在评论中指出的那样,我使用的是保留关键字。请参阅SQLite Keywords