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/// Convert a string to a StatType
12#[must_use]
13pub fn stat_type_from_string(s: &str) -> StatType {
14 match s {
15 // "Number" => StatType::Number,
16 "Decimal" => StatType::Decimal,
17 "Percentage" => StatType::Percentage,
18 "Timestamp" => StatType::Timestamp,
19 _ => StatType::Number,
20 }
21}