Fix git merge conflict
This commit is contained in:
parent
a241bc9d7b
commit
3123a9d129
@ -91,14 +91,13 @@ where
|
|||||||
{
|
{
|
||||||
type PrimaryKey<A> = <<A as ActiveModelTrait>::Entity as EntityTrait>::PrimaryKey;
|
type PrimaryKey<A> = <<A as ActiveModelTrait>::Entity as EntityTrait>::PrimaryKey;
|
||||||
type ValueTypeOf<A> = <PrimaryKey<A> as PrimaryKeyTrait>::ValueType;
|
type ValueTypeOf<A> = <PrimaryKey<A> as PrimaryKeyTrait>::ValueType;
|
||||||
let last_insert_id_opt = match db {
|
let last_insert_id_opt = match db.get_database_backend() {
|
||||||
#[cfg(feature = "sqlx-postgres")]
|
DbBackend::Postgres => {
|
||||||
DatabaseConnection::SqlxPostgresPoolConnection(conn) => {
|
|
||||||
use crate::{sea_query::Iden, Iterable};
|
use crate::{sea_query::Iden, Iterable};
|
||||||
let cols = PrimaryKey::<A>::iter()
|
let cols = PrimaryKey::<A>::iter()
|
||||||
.map(|col| col.to_string())
|
.map(|col| col.to_string())
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
let res = conn.query_one(statement).await?.unwrap();
|
let res = db.query_one(statement).await?.unwrap();
|
||||||
res.try_get_many("", cols.as_ref()).ok()
|
res.try_get_many("", cols.as_ref()).ok()
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user