mirror of
				https://github.com/isar/rusqlite.git
				synced 2025-10-31 13:58:55 +08:00 
			
		
		
		
	SQLite Modules cannot be destroyed.
This commit is contained in:
		| @@ -25,8 +25,14 @@ pub fn create_int_array(conn: &Connection, name: &str) -> Result<Rc<RefCell<Vec< | ||||
| /// Destroy the intarray object by dropping the virtual table. | ||||
| /// If not done explicitly by the application, the virtual table will be dropped implicitly | ||||
| /// by the system when the database connection is closed. | ||||
| /// In fact, the intarray is not destroy until the connection is closed | ||||
| /// because there is no other way to destroy the associated module. | ||||
| pub fn drop_int_array(conn: &Connection, name: &str) -> Result<()> { | ||||
|     conn.execute_batch(&format!("DROP TABLE temp.\"{0}\"", escape_double_quote(name))) | ||||
|     // http://www.mail-archive.com/sqlite-users%40mailinglists.sqlite.org/msg08423.html | ||||
|     // "Once a virtual table module has been created, it cannot be modified or destroyed, except by closing the database connection." | ||||
|     /*let aux: Option<()> = None; | ||||
|     conn.create_module(name, ptr::null() as *const ffi::sqlite3_module, aux)*/ | ||||
| } | ||||
|  | ||||
| init_module!(INT_ARRAY_MODULE, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user