Lines Matching refs:unwrap
101 let mut conn = Connection::open_in_memory().unwrap(); in upgrade_database_test()
102 conn.execute("ATTACH DATABASE 'file::memory:' as persistent;", NO_PARAMS).unwrap(); in upgrade_database_test()
130 .unwrap(); in upgrade_database_test()
134 conn.execute("DROP TABLE IF EXISTS persistent.version;", NO_PARAMS).unwrap(); in upgrade_database_test()
135 conn.execute("DROP TABLE IF EXISTS persistent.test;", NO_PARAMS).unwrap(); in upgrade_database_test()
142 .unwrap(); in upgrade_database_test()
146 conn.transaction_with_behavior(TransactionBehavior::Immediate).unwrap(); in upgrade_database_test()
147 create_or_get_version(&tx, from).unwrap(); in upgrade_database_test()
148 tx.commit().unwrap(); in upgrade_database_test()
152 conn.transaction_with_behavior(TransactionBehavior::Immediate).unwrap(); in upgrade_database_test()
153 upgrade_database(&tx, to, &upgraders).unwrap(); in upgrade_database_test()
154 tx.commit().unwrap(); in upgrade_database_test()
169 .unwrap() in upgrade_database_test()
181 .unwrap() in upgrade_database_test()
190 let mut conn = Connection::open_in_memory().unwrap(); in create_or_get_version_new_database()
191 conn.execute("ATTACH DATABASE 'file::memory:' as persistent;", NO_PARAMS).unwrap(); in create_or_get_version_new_database()
193 let tx = conn.transaction_with_behavior(TransactionBehavior::Immediate).unwrap(); in create_or_get_version_new_database()
194 let version = create_or_get_version(&tx, 3).unwrap(); in create_or_get_version_new_database()
195 tx.commit().unwrap(); in create_or_get_version_new_database()
230 let tx = conn.transaction_with_behavior(TransactionBehavior::Immediate).unwrap(); in create_or_get_version_new_database()
231 let version = create_or_get_version(&tx, 5).unwrap(); in create_or_get_version_new_database()
232 tx.commit().unwrap(); in create_or_get_version_new_database()
245 let tx = conn.transaction_with_behavior(TransactionBehavior::Immediate).unwrap(); in create_or_get_version_new_database()
246 update_version(&tx, 5).unwrap(); in create_or_get_version_new_database()
247 tx.commit().unwrap(); in create_or_get_version_new_database()
252 let tx = conn.transaction_with_behavior(TransactionBehavior::Immediate).unwrap(); in create_or_get_version_new_database()
253 let version = create_or_get_version(&tx, 7).unwrap(); in create_or_get_version_new_database()
254 tx.commit().unwrap(); in create_or_get_version_new_database()
278 let mut conn = Connection::open_in_memory().unwrap(); in create_or_get_version_legacy_database()
279 conn.execute("ATTACH DATABASE 'file::memory:' as persistent;", NO_PARAMS).unwrap(); in create_or_get_version_legacy_database()
293 .unwrap(); in create_or_get_version_legacy_database()
296 let tx = conn.transaction_with_behavior(TransactionBehavior::Immediate).unwrap(); in create_or_get_version_legacy_database()
297 let version = create_or_get_version(&tx, 3).unwrap(); in create_or_get_version_legacy_database()
298 tx.commit().unwrap(); in create_or_get_version_legacy_database()
334 let tx = conn.transaction_with_behavior(TransactionBehavior::Immediate).unwrap(); in create_or_get_version_legacy_database()
335 let version = create_or_get_version(&tx, 5).unwrap(); in create_or_get_version_legacy_database()
336 tx.commit().unwrap(); in create_or_get_version_legacy_database()
349 let tx = conn.transaction_with_behavior(TransactionBehavior::Immediate).unwrap(); in create_or_get_version_legacy_database()
350 update_version(&tx, 5).unwrap(); in create_or_get_version_legacy_database()
351 tx.commit().unwrap(); in create_or_get_version_legacy_database()
356 let tx = conn.transaction_with_behavior(TransactionBehavior::Immediate).unwrap(); in create_or_get_version_legacy_database()
357 let version = create_or_get_version(&tx, 7).unwrap(); in create_or_get_version_legacy_database()
358 tx.commit().unwrap(); in create_or_get_version_legacy_database()