Module tor_dirmgr::storage::sqlite
source Β· Expand description
Net document storage backed by sqlite3.
We store most objects in sqlite tables, except for very large ones, which we store as βblobβ files in a separate directory.
Structs§
- A relay not listed on the main tor network, used for anticensorship.
- SavedBlobHandle πHandle to a blob that we have saved to disk but not yet committed to the database.
- SqliteStore πLocal directory cache using a Sqlite3 connection.
- Unlinker πHandle to a file which we might have to delete.
Constants§
- Query: Remove a cached bridge descriptor
- DROP_OLD_AUTHCERTS πQuery: Discard every expired authority certificate.
- Query: Discard every bridge descriptor that is too old, or from the future. (Both ?=now.)
- DROP_OLD_CONSENSUSES πQuery: Discard every consensus thatβs been expired for at least two days.
- DROP_OLD_EXTDOCS πQuery: Discard every expired extdoc.
- DROP_OLD_MICRODESCS πQuery: Discard every microdescriptor that hasnβt been listed for 3 months.
- DROP_OLD_ROUTERDESCS πQuery: Discard every router descriptor that hasnβt been listed for 3 months.
- FIND_AUTHCERT πQuery: Find the authority certificate with given key digests.
- Query: Find a cached bridge descriptor
- FIND_CONSENSUS πQuery: find the latest-expiring microdesc consensus, regardless of pending status.
- Look up a consensus by its digest-of-signed-part string.
- FIND_CONSENSUS_P πQuery: find the latest-expiring microdesc consensus with a given pending status.
- FIND_EXPIRED_EXTDOCS πQuery: find every ExtDocs member that has expired.
- Query: Find the valid-after time for the latest-expiring non-pending consensus of a given flavor.
- FIND_MD πQuery: find the microdescriptor with a given hex-encoded sha256 digest
- Query: find the router descriptors with a given hex-encoded sha1 digest
- INSERT_AUTHCERT πQuery: Add a new AuthCert
- Query: Record a cached bridge descriptor
- INSERT_CONSENSUS πQuery: Add a new consensus.
- INSERT_EXTDOC πQuery: Add a new entry to ExtDocs.
- INSERT_MD πQuery: Add a new microdescriptor
- Query: Add a new router descriptor
- INSTALL_V0_SCHEMA πSet up the tables for the arti cache schema in a sqlite database.
- Query: Update the consensus whose digest field is βdigestβ to call it no longer pending.
- REMOVE_CONSENSUS πQuery: Remove the consensus with a given digest field.
- SCHEMA_VERSION πVersion number used for this version of the arti cache schema.
- UPDATE_MD_LISTED πQuery: Change the time when a given microdescriptor was last listed.
- UPDATE_SCHEMA πUpdate the database schema, from each version to the next
- Update the database schema version tracking, from each version to the next
Functions§
- cmeta_from_row πCreate a ConsensusMeta from a
Row
returned by one ofFIND_LATEST_CONSENSUS_META
orFIND_CONSENSUS_AND_META_BY_DIGEST
. - digest_from_dstr πConvert a hexadecimal sha3-256 βdigest stringβ as used in the digest column from the database into an array.
- digest_from_hex πConvert a hexadecimal sha3-256 digest from the database into an array.