mirror of
				https://github.com/isar/rusqlite.git
				synced 2025-10-31 05:48:56 +08:00 
			
		
		
		
	Test that extra_check feature works with RETURNING statements (#932)
Test that extra_check feature works with RETURNING statements
This commit is contained in:
		
							
								
								
									
										13
									
								
								src/lib.rs
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								src/lib.rs
									
									
									
									
									
								
							| @@ -1921,4 +1921,17 @@ mod test { | |||||||
|         } |         } | ||||||
|         Ok(()) |         Ok(()) | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     #[test] | ||||||
|  |     #[cfg(feature = "bundled")] // SQLite >= 3.35.0 | ||||||
|  |     fn test_returning() -> Result<()> { | ||||||
|  |         let db = checked_memory_handle(); | ||||||
|  |         db.execute_batch("CREATE TABLE foo(x INTEGER PRIMARY KEY)")?; | ||||||
|  |         let row_id = | ||||||
|  |             db.query_row::<i64, _, _>("INSERT INTO foo DEFAULT VALUES RETURNING ROWID", [], |r| { | ||||||
|  |                 r.get(0) | ||||||
|  |             })?; | ||||||
|  |         assert_eq!(row_id, 1); | ||||||
|  |         Ok(()) | ||||||
|  |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user