这个crate叫做akita,翻译过来就是秋田犬的意思,也代表了呆萌可爱的意思。基本的实现思路就是通过Rust的过程宏来完成对数据库表结构的映射,然后封装了一些便捷的SQL组装的工具方法。目前项目暂时只支持MySQL,所使用的线程池为r2d2,即将计划支持ClickHouse、SQLite、MSSQL、ORACLE等数据库。 直接开码 话不多说咱直接码,...
sfackler/r2d2 - generic connection pool SQL [sql] Generic launchbadge/sqlx - async PostgreSQL/MySQL/SQLite connection pool with strong typing support SeaQL/sea-query - 🔱 A dynamic SQL query builder for MySQL, Postgres and SQLite SeaQL/sea-schema - 🌿 SQL schema definition and discove...
sfackler/r2d2 - generic connection pool SQL [sql] Generic launchbadge/sqlx - async PostgreSQL/MySQL/SQLite connection pool with strong typing support SeaQL/sea-query - 🔱 A dynamic SQL query builder for MySQL, Postgres and SQLite SeaQL/sea-schema - 🌿 SQL schema definition and discove...
usestd::thread;externcrater2d2;externcrater2d2_foodb;fnmain(){letmanager = r2d2_foodb::FooConnectionManager::new("localhost:1234");letpool = r2d2::Pool::builder().max_size(15).build(manager).unwrap();for_in0..20{letpool = pool.clone();thread::spawn(move||{letconn = pool.get()....
sfackler/r2d2— generic connection pool NoSQL [nosql] ArangoDB Rincon— An ArangoDB (NoSQL and Graph store) driver for Rust Cassandra [cassandra, cql] AlexPikalov/cdrs [cdrs]— native client written in Rust Metaswitch/cassandra-rs— bindings to the DataStax C/C++ client CouchDB [...
oracle/railcar— Docker-like container OCI runtime implementation in Rust tailhook/vagga— A containerization tool without daemons 窗口管理 way-cooler/way-cooler— A customizable Wayland compositor (window manager) 网站 Plume-org/Plume— ActivityPub federating blogging application rustlang-cn/ruste...
而在Rust中,最常用的一个池化工具就是r2d2,它本身支持了许多连接的池化,如redis、diesel、sqlx以及postgres和oracle等。我们也可以实现它的trait来管理自定义的需要池化的对象,还是很方便的 可选项:r2d2、deadpool 除了r2d2外,还有一个就是deadpool,它是支持异步的,而r2d2目前看是同步的,所以在并发性能上会有所提升...
r2d2 Rust的通用连接池。 文档每次需要时打开一个新的数据库连接既效率低下,又可能导致r2d2 Rust的通用连接池。 文档每次需要时打开一个新的数据库连接效率低下,并且可能在高流量条件下导致资源耗尽。 连接池维护与数据库的一组开放连接,并将其分发以供重复使用。
oracle/railcar>>- Rust 中,类似 Docker 的容器 OCI 运行时实现 tailhook/vagga>>- 没有守护进程的,容器化工具 窗口管理员 way-cooler/way-cooler>>- 可定制的 Wayland 组合器(窗口管理器) Web Plume-org/Plume>>- ActivityPub 联合博客应用程序
sfackler/r2d2— generic connection pool SQL [sql] Generic launchbadge/sqlx - async PostgreSQL/MySQL/SQLite connection pool with strong typing support SeaQL/sea-query - 🔱 A dynamic SQL query builder for MySQL, Postgres and SQLite SeaQL/sea-schema - 🌿 SQL schema definition and discover...