Skip to content

Perform a raw sql query using sqlx query_as!() #1399

Closed Answered by crushingCodes
crushingCodes asked this question in Q&A
Discussion options

You must be logged in to vote

If anyone else stumbles across this, I found a workaround. It looks like Seaorm passes around a reference to the underlying pool, so I can just grab that, here is a minimal example:

    let db: &DatabaseConnection = db;
    let pool: PgPool = db.get_postgres_connection_pool().clone();

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@crushingCodes
Comment options

@crushingCodes
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by crushingCodes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants