apalis_sql/
lib.rs

1#![doc=include_str!("../README.md")]
2use apalis_core::backend::StatType;
3
4/// SQL backend for Apalis
5pub mod config;
6/// SQL context for jobs stored in a SQL database
7pub mod context;
8/// SQL task row representation and conversion
9pub mod from_row;
10
11/// Extension traits for `TaskBuilder`
12pub mod ext;
13
14/// Convert a string to a StatType
15#[must_use]
16pub fn stat_type_from_string(s: &str) -> StatType {
17    match s {
18        // "Number" => StatType::Number,
19        "Decimal" => StatType::Decimal,
20        "Percentage" => StatType::Percentage,
21        "Timestamp" => StatType::Timestamp,
22        _ => StatType::Number,
23    }
24}