mirror of
				https://github.com/ohwgiles/laminar.git
				synced 2025-06-13 12:54:29 +00:00 
			
		
		
		
	fix SQLITE_DETERMINISTIC compile error under old sqlite3
the centos7 version of sqlite3 doesn't have SQLITE_DETERMINISTIC
This commit is contained in:
		
							parent
							
								
									08b3f25a22
								
							
						
					
					
						commit
						a7aac62897
					
				| @ -51,7 +51,11 @@ static void stdevFinalize(sqlite3_context *context){ | ||||
| 
 | ||||
| Database::Database(const char *path) { | ||||
|     sqlite3_open(path, &hdl); | ||||
|     sqlite3_create_function(hdl, "STDEV", 1, SQLITE_UTF8|SQLITE_DETERMINISTIC, NULL, NULL, stdevStep, stdevFinalize); | ||||
|     int create_func_flags = SQLITE_UTF8; | ||||
| #if SQLITE_VERSION_NUMBER >= 3008003 | ||||
|     create_func_flags |= SQLITE_DETERMINISTIC; | ||||
| #endif | ||||
|     sqlite3_create_function(hdl, "STDEV", 1, create_func_flags, NULL, NULL, stdevStep, stdevFinalize); | ||||
| } | ||||
| 
 | ||||
| Database::~Database() { | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user