Expand description
Table traits, database connection helpers, and shared table constants.
§Row iteration
Prepare a statement with the appropriate table type, then use Table::rows
to decode one row at a time. Use any statement that selects the table’s columns.
use imessage_database::{
tables::{handle::Handle, table::{Table, get_connection}},
util::dirs::default_db_path,
};
let db_path = default_db_path().unwrap();
let db = get_connection(&db_path).unwrap();
let mut statement = Handle::get(&db).unwrap();
for handle_result in Handle::rows(&mut statement, []).unwrap() {
match handle_result {
Ok(handle) => println!("Handle: {}", handle.id),
Err(e) => eprintln!("Error: {:?}", e),
}
}Constants§
- ATTACHMENT
- Attachment table name.
- ATTRIBUTION_
INFO plist-encoded attachment attribution column.- CHAT
- Chat table name.
- CHAT_
HANDLE_ JOIN - Chat-to-handle join table name.
- CHAT_
MESSAGE_ JOIN - Chat-to-message join table name.
- DEFAULT_
PATH_ IOS - Default Messages database path inside an iOS backup.
- DEFAULT_
PATH_ MACOS - Default macOS Messages database path.
- FITNESS_
RECEIVER - Replacement token found in Fitness.app messages.
- HANDLE
- Handle table name.
- ME
- First-person display name for the database owner.
- MESSAGE
- Message table name.
- MESSAGE_
ATTACHMENT_ JOIN - Message-to-attachment join table name.
- MESSAGE_
PAYLOAD plist-encoded app-message payload column.- MESSAGE_
SUMMARY_ INFO plist-encoded message summary column.- PROPERTIES
plist-encoded chat properties column.- RECENTLY_
DELETED - Recently deleted messages table.
- STICKER_
USER_ INFO plist-encoded sticker metadata column.
Traits§
- Table
- Deserialize a database record from a stepped SQLite row.
Functions§
- get_
connection - Open the Messages
SQLitedatabase read-only. - get_
db_ size - Return the database file size on disk.
- open_
blob - Open a
BLOBcolumn forrowid, read-only.