MCPcopy Create free account

hub / github.com/Actyx/ipfs-sqlite-block-store / functions

Functions200 in github.com/Actyx/ipfs-sqlite-block-store

↓ 95 callersMethodctx
(self, s: &'static str)
src/error.rs:66
↓ 30 callersFunctionin_txn
helper to log execution time of a block of code that returns a result will log at info level if `expected_duration` is exceeded, at warn level if the
src/db.rs:1006
↓ 26 callersMethodas_ref
(&self)
src/cidbytes.rs:26
↓ 26 callersMethodcid
(&self)
src/cache/mod.rs:38
↓ 23 callersMethodput_block
Put a block. This will only be completed once the transaction is successfully committed
src/transaction.rs:180
↓ 19 callersMethodlen
(&self)
src/cidbytes.rs:20
↓ 15 callersMethodgc
Perform full GC This is the same as running incremental GC without limits, plus a full SQLITE VACUUM.
src/lib.rs:524
↓ 14 callersMethodalias
( &mut self, name: impl Into<Cow<'b, [u8]>>, link: Option<&'b Cid>, )
src/tests.rs:72
↓ 8 callersFunctionblock
creates a simple leaf block
src/tests.rs:156
↓ 8 callersFunctionblock
creates a block leaf blocks will be larger than branch blocks
examples/stress.rs:27
↓ 6 callersMethodalias
Set or delete an alias
src/lib.rs:605
↓ 6 callersMethodput_blocks
(&mut self, blocks: I, mut pin: Option<&mut TempPin>)
src/lib.rs:662
↓ 5 callersMethodget_block
Get a block
src/transaction.rs:203
↓ 5 callersFunctionlinks
creates a block with some links
src/tests.rs:165
↓ 5 callersFunctionpinned
creates a block with the name "pinned-<i>" and a size of 1000
src/tests.rs:198
↓ 5 callersMethodtransaction
(&mut self)
src/lib.rs:485
↓ 5 callersFunctionunpinned
creates a block with the name "unpinned-<i>" and a size of 1000
src/tests.rs:193
↓ 4 callersMethodincremental_gc
Perform an incremental garbage collection. Will collect unpinned blocks until either the size targets are met again, or at minimum `min_blocks` block
src/lib.rs:559
↓ 4 callersMethodwith_size_targets
Set size targets for the store
src/lib.rs:195
↓ 3 callersMethodadditional_connection
Create another connection to the underlying database This allows you to perform operations in parallel.
src/lib.rs:377
↓ 3 callersFunctionattempt_txn
( mut conn: impl DerefMut<Target = Connection>, f: impl FnOnce(&Transaction) -> crate::Result<T>, )
src/cache/sqlite_tracker.rs:51
↓ 3 callersFunctionget_store_stats
returns the number and size of blocks, excluding orphaned blocks, from the stats table
src/db.rs:235
↓ 3 callersMethodget_store_stats
Get the stats for the store. The stats are kept up to date, so this is fast.
src/transaction.rs:220
↓ 3 callersMethodis_memory
(&self)
src/lib.rs:94
↓ 3 callersMethodwith_cache_tracker
Set strategy for which non-pinned blocks to keep in case one of the size targets is exceeded.
src/lib.rs:200
↓ 2 callersFunctionadd_temp_pin
(txn: &Transaction, block_id: i64, pin: i64)
src/db.rs:492
↓ 2 callersMethodbackup
(&mut self)
src/tests.rs:59
↓ 2 callersFunctionbuild_tree
(prefix: &str, branch: u64, depth: u64)
examples/stress.rs:75
↓ 2 callersFunctioncache_test
(tracker: impl CacheTracker + 'static)
src/tests.rs:362
↓ 2 callersMethodcleanup_temp_pins
Perform maintenance on the TempPins This is done automatically upon every (incremental) GC, so you normally don’t need to call this.
src/lib.rs:504
↓ 2 callersMethodcommit
Commit and consume the transaction. Default is to not commit.
src/transaction.rs:225
↓ 2 callersFunctiondelete_id
(txn: &Transaction, id: i64)
src/cache/sqlite_tracker.rs:111
↓ 2 callersMethodexceeded
(&self, stats: &StoreStats)
src/lib.rs:133
↓ 2 callersFunctionincremental_gc
This is the plan: First figure out in a read transaction which blocks are not referenced; ideally get an iterator for these and stop iterating when e
src/db.rs:274
↓ 2 callersFunctioninit_db
(conn: &mut Connection)
src/cache/sqlite_tracker.rs:36
↓ 2 callersFunctioninit_pragmas
( conn: &mut Connection, is_memory: bool, cache_pages: i64, )
src/db.rs:776
↓ 2 callersMethodmaybe_checkpoint
(&mut self)
src/lib.rs:538
↓ 2 callersFunctionput_block
( txn: &Transaction, key: &C, data: &[u8], links: impl IntoIterator<Item = C>, mut pin: Op
src/db.rs:519
↓ 2 callersMethodretain_ids
(&self, ids: &[i64])
src/cache/mod.rs:127
↓ 2 callersFunctionsized
creates a block with a min size
src/tests.rs:174
↓ 2 callersMethodspawn_blocking
(&self, f: impl FnOnce() + Send + 'static)
examples/cache.rs:50
↓ 2 callersMethodvacuum
Run a full VACUUM on the SQLITE database This may take a while, blocking all other writes to the store.
src/lib.rs:497
↓ 2 callersFunctionws
(s: impl AsRef<str>)
src/db.rs:801
↓ 1 callersFunctionalias
( txn: &Transaction, name: &[u8], key: Option<&C>, )
src/db.rs:674
↓ 1 callersFunctionaliases
(txn: &Transaction)
src/db.rs:761
↓ 1 callersMethodaliases
list all aliases
src/transaction.rs:166
↓ 1 callersFunctionattempt_ro_txn
( mut conn: impl DerefMut<Target = Connection>, f: impl FnOnce(&Transaction) -> crate::Result<T>, )
src/cache/sqlite_tracker.rs:68
↓ 1 callersFunctionblock
creates a simple leaf block
tests/stress.rs:152
↓ 1 callersMethodblocks_accessed
(&self, blocks: Vec<BlockInfo>)
src/cache/mod.rs:107
↓ 1 callersMethodblocks_deleted
(&self, blocks: Vec<BlockInfo>)
src/cache/mod.rs:119
↓ 1 callersMethodblocks_written
(&self, blocks: Vec<WriteInfo>)
src/cache/mod.rs:111
↓ 1 callersFunctionbuild_chain
(prefix: &str, n: usize)
examples/stress.rs:81
↓ 1 callersFunctionbuild_tree_0
( prefix: &str, branch: u64, depth: u64, blocks: &mut Vec<Block>, )
examples/stress.rs:53
↓ 1 callersFunctioncompute_store_stats
returns the number and size of blocks, excluding orphaned blocks, computed from scratch
src/db.rs:182
↓ 1 callersFunctiondelete_temp_pin
(txn: &Transaction, pin: i64)
src/db.rs:471
↓ 1 callersFunctionensure_table
(txn: &Transaction, name: &str, sql: &str)
src/db.rs:818
↓ 1 callersFunctionensure_tables
(txn: &Transaction, tables: &[(&str, &str)])
src/db.rs:869
↓ 1 callersFunctionextend_temp_pin
( txn: &Transaction, mut id: i64, links: Vec<impl ToSql>, )
src/db.rs:478
↓ 1 callersMethodflush
(&mut self)
src/lib.rs:464
↓ 1 callersFunctionget_accessed_bulk
( txn: &Transaction, result: &mut FnvHashMap<i64, Option<i64>>, )
src/cache/sqlite_tracker.rs:86
↓ 1 callersFunctionget_block
Get a block
src/db.rs:572
↓ 1 callersFunctionget_descendants
get the descendants of a cid. This just uses the refs table, so it does not ensure that we actually have data for each cid. The value itself is includ
src/db.rs:614
↓ 1 callersFunctionget_ids
(txn: &Transaction)
src/cache/sqlite_tracker.rs:119
↓ 1 callersFunctionget_key
( cache: &mut impl DerefMut<Target = FnvHashMap<i64, T>>, id: i64, )
src/cache/mod.rs:198
↓ 1 callersFunctionget_missing_blocks
get the set of descendants of an id for which we do not have the data yet. The value itself is included. It is safe to call this method for a cid we d
src/db.rs:643
↓ 1 callersFunctionhas_block
Check if we have a block
src/db.rs:590
↓ 1 callersFunctionhas_cid
Check if we have a cid
src/db.rs:601
↓ 1 callersMethodhas_persistent_state
(&self)
src/cache/mod.rs:123
↓ 1 callersFunctionin_ro_txn
execute a statement in a readonly transaction nested transactions are not allowed here.
src/cache/sqlite_tracker.rs:43
↓ 1 callersFunctioninit_db
( conn: &mut Connection, is_memory: bool, cache_pages: i64, synchronous: Synchronous, )
src/db.rs:935
↓ 1 callersFunctionintegrity_check
(conn: &mut Connection)
src/db.rs:987
↓ 1 callersFunctionlinks
creates a block with some links
tests/stress.rs:161
↓ 1 callersFunctionmigrate_v0_v1
(txn: &Transaction)
src/db.rs:897
↓ 1 callersFunctionquery_roots
(path: &Path)
examples/import.rs:12
↓ 1 callersFunctionrecompute_store_stats
recomputes the store stats (should be done at startup to prevent unbounded drift)
src/db.rs:198
↓ 1 callersMethodresolve
Resolves an alias to a cid
src/lib.rs:614
↓ 1 callersMethodresolve
(&mut self, name: impl Into<Cow<'b, [u8]>>)
src/tests.rs:86
↓ 1 callersFunctionreverse_alias
( txn: &Transaction, cid: impl ToSql, )
src/db.rs:702
↓ 1 callersFunctionset_accessed
(txn: &Transaction, id: i64, accessed: i64)
src/cache/sqlite_tracker.rs:78
↓ 1 callersFunctionsized
creates a block with a min size
examples/cache.rs:30
↓ 1 callersMethodsort_ids
(&self, ids: &mut [i64])
src/cache/mod.rs:115
↓ 1 callersMethodsource
(&self)
src/error.rs:45
↓ 1 callersMethodtemp_pin
Get a temporary alias for safely adding blocks to the store
src/lib.rs:490
↓ 1 callersMethodtemp_pin
(&self)
src/tests.rs:68
↓ 1 callersFunctionvacuum
(conn: &mut Connection)
src/db.rs:770
Methodalias
Set or delete an alias
src/transaction.rs:63
Methodbackup
(&mut self, path: PathBuf)
src/lib.rs:457
Methodblock_exists
true if we had the block already.
src/cache/mod.rs:61
Methodblock_len
(&self)
src/cache/mod.rs:41
Methodblocks_accessed
called whenever blocks were accessed note that this method will be called very frequently, on every block access. it is fire and forget, so it is per
src/cache/mod.rs:81
Methodblocks_accessed
(&self, blocks: Vec<BlockInfo>)
src/cache/async_tracker.rs:37
Methodblocks_accessed
(&self, blocks: Vec<BlockInfo>)
src/cache/sqlite_tracker.rs:170
Methodblocks_deleted
called whenever blocks have been deleted by gc.
src/cache/mod.rs:90
Methodblocks_deleted
(&self, blocks: Vec<BlockInfo>)
src/cache/async_tracker.rs:51
Methodblocks_deleted
(&self, blocks: Vec<BlockInfo>)
src/cache/sqlite_tracker.rs:190
Methodblocks_written
called whenever blocks were written note that this method will be called frequently, on every block write. it is fire and forget, so it is perfectly
src/cache/mod.rs:87
Methodblocks_written
(&self, blocks: Vec<WriteInfo>)
src/cache/async_tracker.rs:44
Methodbranch
(text: &str, links: impl IntoIterator<Item = Cid>)
src/tests.rs:130
Methodbranch
(text: &str, links: impl IntoIterator<Item = Cid>)
tests/stress.rs:143
Methodbranch
(text: &str, links: impl IntoIterator<Item = Cid>)
examples/stress.rs:17
next →1–100 of 200, ranked by callers