3 unstable releases
0.9.0 | Apr 7, 2024 |
---|---|
0.8.1 | Mar 18, 2024 |
0.8.0 | Feb 11, 2024 |
#2550 in Rust patterns
217 downloads per month
Used in 3 crates
(2 directly)
7KB
128 lines
derive-sql
The project contains the following:
derive-sql
: the root of thederive-sql
library as published on crates.io. Defines the traitSqlable
.extras/derive-sql-sqlite
: the package with the implementation of theDeriveSqlite
macro that implement theSqlable
trait based on a struct with named fields.extras/derive-sql-mysql
: the package with the implementation of theDeriveMysql
macro that implement theSqlable
trait for MySQL based on a struct with named fields.
Publishing
Process to work through publishing all crates:
# Modify Cargo.toml to use version in place of path
vi extras/derive-sql-common/Cargo.toml extras/derive-sql-mysql/Cargo.toml extras/derive-sql-sqlite/Cargo.toml derive-sql/Cargo.toml
git add extras/derive-sql-common/Cargo.toml extras/derive-sql-mysql/Cargo.toml extras/derive-sql-sqlite/Cargo.toml derive-sql/Cargo.toml
git commit -m "Pre-release change from path to version"
git push
git tag -a v0.7.0 -m "Version 0.7.0"
git push origin v0.7.0
(
cd extras/derive-sql-common
cargo publish
)
(
cd extras/derive-sql-mysql
cargo publish
)
(
cd extras/derive-sql-sqlite
cargo publish
)
(
cd derive-sql
cargo publish
)
lib.rs
:
Common functions/items employed through the derive-sql
crates and associated
Dependencies
~0.8–1.3MB
~26K SLoC