• Home
  • Raw
  • Download

Lines Matching refs:blob

203     blob: *mut ffi::sqlite3_blob,  field
226 let mut blob = ptr::null_mut(); in blob_open() localVariable
238 &mut blob, in blob_open()
243 blob, in blob_open()
256 let rc = unsafe { ffi::sqlite3_blob_reopen(self.blob, row) }; in reopen()
266 unsafe { ffi::sqlite3_blob_bytes(self.blob) } in size()
294 let rc = unsafe { ffi::sqlite3_blob_close(self.blob) }; in close_()
295 self.blob = ptr::null_mut(); in close_()
314 unsafe { ffi::sqlite3_blob_read(self.blob, buf.as_mut_ptr() as *mut _, n, self.pos) }; in read()
343 let rc = unsafe { ffi::sqlite3_blob_write(self.blob, buf.as_ptr() as *mut _, n, self.pos) }; in write()
427 let mut blob = db in test_blob() localVariable
430 assert_eq!(4, blob.write(b"Clob").unwrap()); in test_blob()
431 assert_eq!(6, blob.write(b"567890xxxxxx").unwrap()); // cannot write past 10 in test_blob()
432 assert_eq!(0, blob.write(b"5678").unwrap()); // still cannot write past 10 in test_blob()
434 blob.reopen(rowid).unwrap(); in test_blob()
435 blob.close().unwrap(); in test_blob()
437 blob = db in test_blob()
441 assert_eq!(5, blob.read(&mut bytes[..]).unwrap()); in test_blob()
443 assert_eq!(5, blob.read(&mut bytes[..]).unwrap()); in test_blob()
445 assert_eq!(0, blob.read(&mut bytes[..]).unwrap()); in test_blob()
447 blob.seek(SeekFrom::Start(2)).unwrap(); in test_blob()
448 assert_eq!(5, blob.read(&mut bytes[..]).unwrap()); in test_blob()
452 blob.seek(SeekFrom::Current(-1)).unwrap(); in test_blob()
453 assert_eq!(4, blob.read(&mut bytes[..]).unwrap()); in test_blob()
456 blob.seek(SeekFrom::End(-6)).unwrap(); in test_blob()
457 assert_eq!(5, blob.read(&mut bytes[..]).unwrap()); in test_blob()
460 blob.reopen(rowid).unwrap(); in test_blob()
461 assert_eq!(5, blob.read(&mut bytes[..]).unwrap()); in test_blob()
465 assert!(blob.seek(SeekFrom::Current(-20)).is_err()); in test_blob()
466 assert!(blob.seek(SeekFrom::End(0)).is_ok()); in test_blob()
467 assert!(blob.seek(SeekFrom::Current(1)).is_err()); in test_blob()
471 blob.reopen(rowid).unwrap(); in test_blob()
472 assert!(blob.write_all(b"0123456789x").is_err()); in test_blob()
479 let mut blob = db in test_blob_in_bufreader() localVariable
482 assert_eq!(8, blob.write(b"one\ntwo\n").unwrap()); in test_blob_in_bufreader()
484 blob.reopen(rowid).unwrap(); in test_blob_in_bufreader()
485 let mut reader = BufReader::new(blob); in test_blob_in_bufreader()
505 let blob = db in test_blob_in_bufwriter() localVariable
508 let mut writer = BufWriter::new(blob); in test_blob_in_bufwriter()
518 let mut blob = db in test_blob_in_bufwriter() localVariable
522 assert_eq!(10, blob.read(&mut bytes[..]).unwrap()); in test_blob_in_bufwriter()
527 let blob = db in test_blob_in_bufwriter() localVariable
530 let mut writer = BufWriter::new(blob); in test_blob_in_bufwriter()
539 let mut blob = db in test_blob_in_bufwriter() localVariable
543 assert_eq!(10, blob.read(&mut bytes[..]).unwrap()); in test_blob_in_bufwriter()