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

Download history 4/week @ 2024-02-09 22/week @ 2024-02-16 30/week @ 2024-02-23 6/week @ 2024-03-01 9/week @ 2024-03-08 110/week @ 2024-03-15 19/week @ 2024-03-22 38/week @ 2024-03-29 143/week @ 2024-04-05 11/week @ 2024-04-12

217 downloads per month
Used in 3 crates (2 directly)

MIT license

7KB
128 lines

derive-sql

The project contains the following:

  • derive-sql: the root of the derive-sql library as published on crates.io. Defines the trait Sqlable.
  • extras/derive-sql-sqlite: the package with the implementation of the DeriveSqlite macro that implement the Sqlable trait based on a struct with named fields.
  • extras/derive-sql-mysql: the package with the implementation of the DeriveMysql macro that implement the Sqlable 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