MCPcopy Create free account
hub / github.com/actix/examples / insert_branch_data

Function insert_branch_data

databases/mysql/src/persistence.rs:202–218  ·  view source on GitHub ↗

Insert data into the database table `branch_details`.

(
    conn: &mut mysql::PooledConn,
    my_branch_name: String,
    my_location: String,
)

Source from the content-addressed store, hash-verified

200
201/// Insert data into the database table `branch_details`.
202fn insert_branch_data(
203 conn: &mut mysql::PooledConn,
204 my_branch_name: String,
205 my_location: String,
206) -> mysql::error::Result<u64> {
207 conn.exec_drop(
208 "
209 INSERT INTO branch_details (branch_name, location)
210 VALUES (:branch_name, :location)
211 ",
212 params! {
213 "branch_name" => my_branch_name,
214 "location" => my_location,
215 },
216 )
217 .map(|_| conn.last_insert_id())
218}
219
220/// Insert data into the database table `teller_details`.
221fn insert_teller_data(

Callers 1

create_branchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected