MCPcopy Create free account
hub / github.com/NyxCode/ormx / insert

Method insert

ormx/src/lib.rs:73–79  ·  view source on GitHub ↗

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>,
    )

Source from the content-addressed store, hash-verified

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>(

Callers 3

mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected