This repository has been archived on 2025-03-12. You can view files and clone it, but cannot push or open issues or pull requests.
asklyphe-common/src/db/tables.rs

80 lines
3.1 KiB
Rust
Raw Normal View History

2025-03-07 15:39:45 -08:00
/*
* asklyphe-common db/tables.rs
* - foundationdb key name parts
*
* Copyright (C) 2025 Real Microsoft, LLC
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
use log::info;
/// str = STRHASH
/// text = u64 len + chars
/// (derank_<id i64>)
/// (match text, unless text, and text, use_unless bool, use_and bool, value f64, comment text)
pub const DERANK_TABLE: &str = "derank";
/// (info_<url str>)
/// (url STRHASH, title text, description text, favicon hash)
pub const INFO_TABLE: &str = "info";
pub const INFO_TABLE_TITLE: &str = "title";
pub const INFO_TABLE_DESC: &str = "desc";
pub const INFO_TABLE_FAVICON: &str = "favicon";
/// (hash_<hash i64>)
/// (value text)
pub const HASH_TABLE: &str = "hash";
/// (dehomo_<id>)
/// (block text, unless text)
pub const DEHOMOGENISE_TABLE: &str = "dehomogenise";
/// (website_<url str>)
/// (host text, flags u8,
/// damping f64, lastparsebegin i64,
/// lastparsefinish i64, lastparsefinishtrue i64,
/// cachedpagerank f64, lastpagerankcache i64,
/// robotsflag bool)
pub const WEBSITE_TABLE: &str = "website";
pub const WEBSITE_TABLE_HOST: &str = "host";
pub const WEBSITE_TABLE_DAMPING: &str = "damping";
pub const WEBSITE_TABLE_LASTPARSEBEGIN: &str = "lastparsebegin";
pub const WEBSITE_TABLE_LASTPARSEFINISH: &str = "lastparsefinish";
pub const WEBSITE_TABLE_LASTPARSEFINISHTRUE: &str = "lastparsefinishtrue";
pub const WEBSITE_TABLE_CACHEDPAGERANK: &str = "cachedpagerank";
pub const WEBSITE_TABLE_LASTPAGERANKCACHE: &str = "lastpagerankcache";
pub const WEBSITE_TABLE_ROBOTSFLAG: &str = "robotsflag";
pub const WEBSITE_TABLE_WORDCOUNT: &str = "wordcount";
/// (host_<url str>)
/// (lastcrawl i64)
pub const HOST_TABLE: &str = "hosts";
/// (word_<word str>_<url str>)
/// see vorebot words encoded format
/// --
/// (wurl_<url str>_<word str>)
/// (word i64, maybe expand in future)
pub const WORD_TABLE: &str = "word";
pub const WURL_TABLE: &str = "word";
/// (metaword_<mword str>_<prop str>_<url str>)
/// see vorebot metawords encoded format
/// --
/// (metawurl_<url str>_<prop str>_<mword str>)
/// (mword i64, maybe expand in future)
pub const METAWORD_TABLE: &str = "metaword";
pub const METAWURL_TABLE: &str = "metawurl";
/// (link_<from str>_<to str>)
/// (flags u8)
/// --
/// (revlink_<to str>_<from str>)
/// (flags u8)
pub const LINK_TABLE: &str = "link";
pub const REVLINK_TABLE: &str = "revlink";
/// (linkword_<word>_<from str>_<to str>)
/// see vorebot linkword encoded format
/// --
/// (linkwurl_<from str>_<to str>_<word>)
/// (word i64, maybe expand in future)
pub const LINKWORD_TABLE: &str = "linkword";