unobtanium 3.0.0

Opinioated Web search engine library with crawler and viewer companion.
Documentation
// DO NOT MODIFY BY HAND!
// This was generated by generate_database_fields.lua
//
// Regenerate if the database tables have changed.

use criterium::sql::Table;

#[derive(Debug, Clone, PartialEq, Eq)]
pub enum BaseTable {
	MimeParameter,
	Mimetype,
	Origin,
	UnobtaniumDatabaseInfo,
	Url,
}

impl Table for BaseTable {
	fn sql_safe_table_name(&self) -> &str {
		match self {
			Self::MimeParameter => "mime_parameter",
			Self::Mimetype => "mimetype",
			Self::Origin => "origin",
			Self::UnobtaniumDatabaseInfo => "unobtanium_database_info",
			Self::Url => "url",
		}
	}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum CrawlerTable {
	Base(BaseTable),
	Agent,
	CrawlCandidate,
	CrawlLog,
	File,
	FileText,
	Redirect,
	Request,
	TempIgnoreOrigin,
	TempIgnoreUrl,
}

impl Table for CrawlerTable {
	fn sql_safe_table_name(&self) -> &str {
		match self {
			Self::Base(t) => t.sql_safe_table_name(),
			Self::Agent => "agent",
			Self::CrawlCandidate => "crawl_candidate",
			Self::CrawlLog => "crawl_log",
			Self::File => "file",
			Self::FileText => "file_text",
			Self::Redirect => "redirect",
			Self::Request => "request",
			Self::TempIgnoreOrigin => "temp.ignore_origin",
			Self::TempIgnoreUrl => "temp.ignore_url",
		}
	}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum SummaryTable {
	Base(BaseTable),
	CrawlSummary,
	DocumentDescription,
	DuplicateSummary,
	EntityGeneration,
	FileSummary,
	FullTextEntityIndex,
	HttpSummary,
	LinkSummary,
	RedirectSummary,
	TextPile,
	Token,
	TokenStatistics,
}

impl Table for SummaryTable {
	fn sql_safe_table_name(&self) -> &str {
		match self {
			Self::Base(t) => t.sql_safe_table_name(),
			Self::CrawlSummary => "crawl_summary",
			Self::DocumentDescription => "document_description",
			Self::DuplicateSummary => "duplicate_summary",
			Self::EntityGeneration => "entity_generation",
			Self::FileSummary => "file_summary",
			Self::FullTextEntityIndex => "full_text_entity_index",
			Self::HttpSummary => "http_summary",
			Self::LinkSummary => "link_summary",
			Self::RedirectSummary => "redirect_summary",
			Self::TextPile => "text_pile",
			Self::Token => "token",
			Self::TokenStatistics => "token_statistics",
		}
	}
}