sqlite_extras/queries/
compile_options.rs

1use sqlx::{sqlite::SqliteRow, Row};
2
3use super::shared::Query;
4
5#[derive(Debug, Clone)]
6pub struct CompileOptions {
7    pub value: String,
8}
9
10impl Query for CompileOptions {
11    fn new(row: &SqliteRow) -> Self {
12        Self { value: row.get(0) }
13    }
14
15    fn to_row(&self) -> prettytable::Row {
16        row![self.value]
17    }
18
19    fn headers() -> prettytable::Row {
20        row!["value"]
21    }
22
23    fn read_file() -> String {
24        include_str!("../sql/compile_options.sql").to_string()
25    }
26}