Insert a row into the database.
(
#[cfg(not(feature = "mysql"))] db: impl Executor<'c, Database = Db> + 'a,
#[cfg(feature = "mysql")] db: &'c mut sqlx::MySqlConnection,
row: impl Insert<Table = Self>,
)
| 71 | |
| 72 | /// Insert a row into the database. |
| 73 | fn insert<'a, 'c: 'a>( |
| 74 | #[cfg(not(feature = "mysql"))] db: impl Executor<'c, Database = Db> + 'a, |
| 75 | #[cfg(feature = "mysql")] db: &'c mut sqlx::MySqlConnection, |
| 76 | row: impl Insert<Table = Self>, |
| 77 | ) -> impl Future<Output = Result<Self>> + Send + 'a { |
| 78 | row.insert(db) |
| 79 | } |
| 80 | |
| 81 | /// Queries the row of the given id. |
| 82 | fn get<'a, 'c: 'a>( |