Просмотр исходного кода

160811

modify sqlite extension function, add extension when open database.

NO NEED TO EXPLICITLY CALL [iSalesDB AddExFunction] ANYMORE.
Ray Zhang 9 лет назад
Родитель
Сommit
e6bfb72bf5

+ 4 - 4
RedAnt ERP Mobile/common/Functions/offline/OLDataProvider.m

@@ -2754,8 +2754,8 @@
     
     
     
-    
-    int result= [iSalesDB AddExFunction:db];
+
+   // int result= [iSalesDB AddExFunction:db];
     
     int count =0;
     
@@ -3550,7 +3550,7 @@
     
     
     sqlite3 *db = [iSalesDB get_db];
-    [iSalesDB AddExFunction:db];
+   // [iSalesDB AddExFunction:db];
     
     int count;
     NSString *where = [NSString stringWithFormat:@"category like'%%#%@#%%'",category];
@@ -3794,7 +3794,7 @@
    
     
     sqlite3 *db = [iSalesDB get_db];
-    [iSalesDB AddExFunction:db];
+  //  [iSalesDB AddExFunction:db];
     
 #warning count 在filter情况下不能使用get_recordcount:table:where:
     int count;

+ 1 - 1
RedAnt ERP Mobile/common/data_provider/iSalesDB.h

@@ -43,7 +43,7 @@ typedef void(^queryBlock)(sqlite3_stmt *stmt,NSMutableDictionary *container,long
 +(NSArray*) get_saveduser;
 
 + (sqlite3*) get_db_at:(NSString* )path;
-+(int) AddExFunction:(sqlite3 *) db;
+//+(int) AddExFunction:(sqlite3 *) db;
 
 #pragma mark - JK
 

+ 1 - 0
RedAnt ERP Mobile/common/data_provider/iSalesDB.m

@@ -376,6 +376,7 @@ void decryptfield (sqlite3_context *context, int argc, sqlite3_value **argv) {
         [iSalesDB close_db:db];
     }
 
+    [self AddExFunction:db];
     return db;