sql-gen
sql-gen copied to clipboard
EF inspired codegen for Rust
### Problem - sql-gen panics on some postgres types, like: "_int8" => "i64", "_int4" => "i32", "_int2" => "i16", "_text" => "String", "jsonb" => "serde_json::Value", "time" => "chrono::NaiveTime", "bool" =>...
Hello Great project! It would be cool to see support for postgres views.
Currently I'm at some indecision for inserts. Whether to have dedicated insert objects with optional fields for anything with possible defaults or serial / auto incrementing ids. Very open to...
closes #12 I wanted to bypass geo types by making it String on the rust side to store the geom from SQL as a string. I've also added new features...
- **feat: cube support** Closes https://github.com/jayy-lmao/sql-gen/issues/9 by adding postgres cubes. Note when using this you will need sqlx >= 0.8, but wont be a dep unless your db has cubes...
one of the migration files looks like this: ```sql CREATE EXTENSION IF NOT EXISTS postgis; CREATE TABLE IF NOT EXISTS trails ( id BIGSERIAL PRIMARY KEY, location GEOMETRY(Point, 4326) NOT...
I like my pure data structs to have public fields. AFAIK, your crate make them by default private and there is no way to change that. So, i have implemented...
sql-gen has a function `detect_dependencies` in `DbSetsFsWriter` which automatically includes custom types defined elsewhere when they are use by each model generated. However, if the typeof the dependencies is enclosed...
fixes https://github.com/jayy-lmao/sql-gen/issues/20 Needs review, this is also more of a demonstration than a PR to confirm my assumptions related to the issue. I haven't tested on INT2. But for INT4...