refactor: uniformize project naming
This commit is contained in:
parent
3b134cdb6c
commit
3977e08084
13 changed files with 40 additions and 30 deletions
42
Cargo.lock
generated
42
Cargo.lock
generated
|
|
@ -486,25 +486,6 @@ dependencies = [
|
||||||
"slab",
|
"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]]
|
[[package]]
|
||||||
name = "generic-array"
|
name = "generic-array"
|
||||||
version = "0.14.7"
|
version = "0.14.7"
|
||||||
|
|
@ -1203,7 +1184,7 @@ dependencies = [
|
||||||
"fully_pub",
|
"fully_pub",
|
||||||
"serde",
|
"serde",
|
||||||
"sqlx",
|
"sqlx",
|
||||||
"sqlx_tools_attributes",
|
"sqlxgentools_attrs",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -1541,13 +1522,32 @@ dependencies = [
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sqlx_tools_attributes"
|
name = "sqlxgentools_attrs"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"attribute-derive",
|
"attribute-derive",
|
||||||
"proc-macro2",
|
"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]]
|
[[package]]
|
||||||
name = "stable_deref_trait"
|
name = "stable_deref_trait"
|
||||||
version = "1.2.0"
|
version = "1.2.0"
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
[workspace]
|
[workspace]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
members = [
|
members = [
|
||||||
"lib/sqlx_tools_attributes",
|
"lib/sqlxgentools_attrs",
|
||||||
"lib/sqlx_tools_generator_cli",
|
"lib/sqlxgentools_cli",
|
||||||
"lib/sandbox"
|
"lib/sandbox"
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
16
README.md
16
README.md
|
|
@ -1,8 +1,6 @@
|
||||||
# [WIP] sqlxgentools
|
# [WIP] sqlxgentools
|
||||||
|
|
||||||
better name: sqlitexgentools, sqlitexgen
|
Tools to generate SQL migrations and Rust SQLx repositories code from models structs to use with a SQLite database.
|
||||||
|
|
||||||
Tools to generate SQL migrations and Rust SQLx repositories code from models structs in a SQLite context.
|
|
||||||
|
|
||||||
Will be used in [minauthator](https://forge.lefuturiste.fr/mbess/minauthator).
|
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
|
- 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
|
## Usage
|
||||||
|
|
||||||
### Generate initial CREATE TABLE sqlite migration
|
### Generate initial CREATE TABLE sqlite migration
|
||||||
|
|
|
||||||
|
|
@ -11,4 +11,4 @@ chrono = "0.4.39"
|
||||||
fully_pub = "0.1.4"
|
fully_pub = "0.1.4"
|
||||||
serde = "1.0.216"
|
serde = "1.0.216"
|
||||||
sqlx = { version = "0.8.2", features = ["chrono", "uuid", "sqlite"] }
|
sqlx = { version = "0.8.2", features = ["chrono", "uuid", "sqlite"] }
|
||||||
sqlx_tools_attributes = { path = "../sqlx_tools_attributes" }
|
sqlxgentools_attrs = { path = "../sqlxgentools_attrs" }
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ use chrono::{DateTime, Utc};
|
||||||
use sqlx::types::Json;
|
use sqlx::types::Json;
|
||||||
use fully_pub::fully_pub;
|
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)]
|
#[derive(sqlx::Type, Clone, Debug, PartialEq)]
|
||||||
enum UserStatus {
|
enum UserStatus {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "sqlx_tools_attributes"
|
name = "sqlxgentools_attrs"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "generator_cli"
|
name = "sqlxgentools_cli"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue