Thanks to visit codestin.com
Credit goes to github.com

Skip to content

DatabaseConnection is not Send, Sync and Clone #152

@tqwewe

Description

@tqwewe

SeaORM's DatabaseConnection type is not Send, Sync and Clone.
These should be easily added as DatabaseConnection is a wrapper of the Sqlx pool types, which themselves are Send, Sync and Clone.

On the Sqlx Pool documentation:

Pool is Send, Sync and Clone, so it should be created once at the start of your application/daemon/web server/etc. and then shared with all tasks throughout its lifetime.

This is usually needed for many apps, such as an actix server, so it can be sent between threads to aquire new connections.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions