Crates.io | sqlite-rs |
lib.rs | sqlite-rs |
version | 0.3.7 |
source | src |
created_at | 2023-08-03 04:54:46.047507 |
updated_at | 2024-01-17 04:58:03.445233 |
description | SQLite reader in pure Rust |
homepage | |
repository | https://github.com/afsec/sqlite-rs |
max_upload_size | |
id | 933404 |
size | 754,461 |
SQLite library in pure Rust and no dependencies (Under Development)
cargo install sqlite-rs
sqlite-rs
sqlite-rs --database-file=mydb.db?mode=ro
sqlite-rs --database-file=mydb.db?mode=rw
sqlite-rs --database-file=mydb.db
sqlite-rs --database-file=mydb.db?mode=rwc
sqlite-rs v0.3.3 - 1705457528
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite-rs> .dbinfo
database page size: 4096
write format: 1
read format: 1
reserved bytes: 0
file change counter: 0
database page count: 1
freelist page count: 0
schema cookie: 0
schema format: 4
default cache size: 0
autovacuum top root: 0
incremental vacuum: 0
text encoding: 1 (utf8)
user version: 0
application id: 0
software version: 303
echo '.dbinfo' | sqlite-rs
database page size: 4096
write format: 1
read format: 1
reserved bytes: 0
file change counter: 0
database page count: 1
freelist page count: 0
schema cookie: 0
schema format: 4
default cache size: 0
autovacuum top root: 0
incremental vacuum: 0
text encoding: 1 (utf8)
user version: 0
application id: 0
software version: 303
TRACE
RUST_LOG="trace" sqlite-rs
echo '.dbinfo' | RUST_LOG="trace" sqlite-rs
1705457633.7426755 TRACE sqlite_rs: Openning SQliteIo [:memory:]...
1705457633.7427387 TRACE sqlite_rs: SQliteIo started: [SqliteIo { mode: InMemory }].
1705457633.7427547 TRACE sqlite_rs: Connecting SqlitePager...
1705457633.7427745 TRACE sqlite_rs::pager: [0] Bytes read from [InMemory]
1705457633.7427909 TRACE sqlite_rs: SQliteIo started: [SqlitePager { io: SqliteIo { mode: InMemory }, page_size: L4096, reserved_bytes_per_page: ReservedBytesPerPage(0) }].
1705457633.7428088 TRACE sqlite_rs: Starting SqliteRuntime...
1705457633.7428281 TRACE sqlite_rs: SqliteRuntime started: [SqliteRuntime { pager: SqlitePager { io: SqliteIo { mode: InMemory }, page_size: L4096, reserved_bytes_per_page: ReservedBytesPerPage(0) }, header: SqliteHeader { magic_header_string: MagicHeaderString, page_size: L4096, file_format_version_numbers: FileFormatVersionNumbers { write_version: Legacy, read_version: Legacy }, reserved_bytes_per_page: ReservedBytesPerPage(0), payload_fractions: PayloadFractions { maximum: MaximumEmbeddedPayloadFraction(64), minimum: MinimumEmbeddedPayloadFraction(32), leaf: LeafPayloadFraction(32) }, file_change_counter: FileChangeCounter(0), db_filesize_in_pages: DatabaseFileSizeInPages(1), freelist_pages: FreeListPages { first: FreeListPagesFirstTrunkPage(0), total: FreeListPagesTotalPages(0) }, schema_cookie: SchemaCookie(0), schema_format: Format4, suggested_cache_size: SuggestedCacheSize(0), incremental_vacuum_settings: IncrementalVacuumSettings { largest_root_btree_page: LargestRootBtreePage(0), incremental_vacuum_mode: False }, database_text_encoding: Utf8, user_version: UserVersion(0), application_id: ApplicationId(0), reserved_for_expansion: ReservedForExpansion, version_valid_for: VersionValidFor(303), write_library_version: WriteLibraryVersion(303) }, btree: SqliteBtree(()) }].
database page size: 4096
write format: 1
read format: 1
reserved bytes: 0
file change counter: 0
database page count: 1
freelist page count: 0
schema cookie: 0
schema format: 4
default cache size: 0
autovacuum top root: 0
incremental vacuum: 0
text encoding: 1 (utf8)
user version: 0
application id: 0
software version: 303
git clone https://github.com/afsec/sqlite-rs
RUST_LOG="trace" cargo run -- --database-file=./data/flights-initial.db
RUST_LOG="trace" cargo test -- --nocapture --test-threads=1
sqlite_info
RUST_LOG="trace" cargo run --release --target=$(arch)-unknown-linux-musl --example sqlite_info