We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当Record中的某个字段为UUID格式 (如4885D273-C3C6-40AE-9504-A147C4B3ACFB),这条数据,可以插入到数据库,但是通过这个字段的值去查询的时候,查不到这个数据。
然后,我又测试了你的test案例,这种情况同样的是出现的,在insert的例子中 //Insert NSError error = nil; / test 1001 */ TestTable *table = [[TestTable alloc] init]; TestRecord *record = [[TestRecord alloc] init]; record.age = @(1); record.name = @"4885D273-C3C6-40AE-9504-A147C4B3ACFB"; record.tomas = @"1"; [table insertRecord:record error:&error]; if ([record.primaryKey integerValue] > 0) { NSLog(@"1001 success"); } else { NSException *exception = [[NSException alloc] init]; @throw exception; } //
//Fetch error = nil; NSArray *recordList = [table findAllWithKeyName:@"name" value:@"4885D273-C3C6-40AE-9504-A147C4B3ACFB" error:&error]; if (recordList.count == 0) { NSException *exception = [[NSException alloc] init]; @throw exception; } else { NSLog(@"2021 success"); }
NSLog(@"End Fetch Test");
//
record中的name字段,在我的测试过程中,发现name为UUID格式时,或者也可以说不全为数字时,都是查询不到的,我不知道是不是我使用方式错误,遗漏了某些地方,还是这里是有bug的
update: 原来是这个问题,TEXT类型的数据,需要加‘’,否则如果出现像UUID这种格式的字符串,就无法判别,只拿到前面的那些数字... 不知道这算不算个问题,或者,你可以在你的NSString里面多加一个方法,预防一下这个问题的出现
The text was updated successfully, but these errors were encountered:
好的,针对这个问题已经发布1.3.0
Sorry, something went wrong.
No branches or pull requests
然后,我又测试了你的test案例,这种情况同样的是出现的,在insert的例子中
//Insert
NSError error = nil;
/ test 1001 */
TestTable *table = [[TestTable alloc] init];
TestRecord *record = [[TestRecord alloc] init];
record.age = @(1);
record.name = @"4885D273-C3C6-40AE-9504-A147C4B3ACFB";
record.tomas = @"1";
[table insertRecord:record error:&error];
if ([record.primaryKey integerValue] > 0) {
NSLog(@"1001 success");
} else {
NSException *exception = [[NSException alloc] init];
@throw exception;
}
//
//Fetch
error = nil;
NSArray *recordList = [table findAllWithKeyName:@"name" value:@"4885D273-C3C6-40AE-9504-A147C4B3ACFB" error:&error];
if (recordList.count == 0) {
NSException *exception = [[NSException alloc] init];
@throw exception;
} else {
NSLog(@"2021 success");
}
//
record中的name字段,在我的测试过程中,发现name为UUID格式时,或者也可以说不全为数字时,都是查询不到的,我不知道是不是我使用方式错误,遗漏了某些地方,还是这里是有bug的
update:
原来是这个问题,TEXT类型的数据,需要加‘’,否则如果出现像UUID这种格式的字符串,就无法判别,只拿到前面的那些数字...
不知道这算不算个问题,或者,你可以在你的NSString里面多加一个方法,预防一下这个问题的出现
The text was updated successfully, but these errors were encountered: