refactor: uniformize project naming

This commit is contained in:
Matthieu Bessat 2025-03-15 10:21:53 +01:00
parent 3b134cdb6c
commit 3977e08084
13 changed files with 40 additions and 30 deletions

42
Cargo.lock generated
View file

@ -486,25 +486,6 @@ dependencies = [
"slab",
]
[[package]]
name = "generator_cli"
version = "0.0.0"
dependencies = [
"anyhow",
"argh",
"attribute-derive",
"convert_case",
"fully_pub",
"heck",
"prettyplease",
"proc-macro2",
"quote",
"serde",
"serde_json",
"structmeta",
"syn",
]
[[package]]
name = "generic-array"
version = "0.14.7"
@ -1203,7 +1184,7 @@ dependencies = [
"fully_pub",
"serde",
"sqlx",
"sqlx_tools_attributes",
"sqlxgentools_attrs",
]
[[package]]
@ -1541,13 +1522,32 @@ dependencies = [
]
[[package]]
name = "sqlx_tools_attributes"
name = "sqlxgentools_attrs"
version = "0.0.0"
dependencies = [
"attribute-derive",
"proc-macro2",
]
[[package]]
name = "sqlxgentools_cli"
version = "0.0.0"
dependencies = [
"anyhow",
"argh",
"attribute-derive",
"convert_case",
"fully_pub",
"heck",
"prettyplease",
"proc-macro2",
"quote",
"serde",
"serde_json",
"structmeta",
"syn",
]
[[package]]
name = "stable_deref_trait"
version = "1.2.0"

View file

@ -1,8 +1,8 @@
[workspace]
resolver = "2"
members = [
"lib/sqlx_tools_attributes",
"lib/sqlx_tools_generator_cli",
"lib/sqlxgentools_attrs",
"lib/sqlxgentools_cli",
"lib/sandbox"
]

View file

@ -1,8 +1,6 @@
# [WIP] sqlxgentools
better name: sqlitexgentools, sqlitexgen
Tools to generate SQL migrations and Rust SQLx repositories code from models structs in a SQLite context.
Tools to generate SQL migrations and Rust SQLx repositories code from models structs to use with a SQLite database.
Will be used in [minauthator](https://forge.lefuturiste.fr/mbess/minauthator).
@ -20,6 +18,18 @@ Will be used in [minauthator](https://forge.lefuturiste.fr/mbess/minauthator).
- Provide a full a ORM interface
## Features
- [x] generate migrations
- [x] from scratch
- [ ] up migration
- [ ] down migration
- [x] generate repositories
- [x] get_all
- [x] get_by_id
- [x] insert
- [x] insert_many
## Usage
### Generate initial CREATE TABLE sqlite migration

View file

@ -11,4 +11,4 @@ chrono = "0.4.39"
fully_pub = "0.1.4"
serde = "1.0.216"
sqlx = { version = "0.8.2", features = ["chrono", "uuid", "sqlite"] }
sqlx_tools_attributes = { path = "../sqlx_tools_attributes" }
sqlxgentools_attrs = { path = "../sqlxgentools_attrs" }

View file

@ -2,7 +2,7 @@ use chrono::{DateTime, Utc};
use sqlx::types::Json;
use fully_pub::fully_pub;
use sqlx_tools_attributes::{sql_generator_model, SqlGeneratorDerive};
use sqlxgentools_attrs::{sql_generator_model, SqlGeneratorDerive};
#[derive(sqlx::Type, Clone, Debug, PartialEq)]
enum UserStatus {

View file

@ -1,5 +1,5 @@
[package]
name = "sqlx_tools_attributes"
name = "sqlxgentools_attrs"
edition = "2021"
[dependencies]

View file

@ -1,5 +1,5 @@
[package]
name = "generator_cli"
name = "sqlxgentools_cli"
edition = "2021"
[[bin]]