-
-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Modify generation to slim query_root.rs * Add `RelationBuilder` trait * Use seaography flag on generation * Use DeriveRelatedEntity macro * Slim down parsing * Slim down code generation * Add seaography::register_entities macro It returns the seaography `Builder` * Register "related entity" / "entity" without relation * Rename `register_entity` macros * Update docs * Update crates --------- Co-authored-by: Billy Chan <[email protected]>
- Loading branch information
Showing
79 changed files
with
842 additions
and
1,056 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,13 +95,13 @@ jobs: | |
uses: baptiste0928/cargo-install@v2 | ||
with: | ||
crate: sea-orm-cli | ||
version: '0.11.0' | ||
version: '0.12.0-rc.5' | ||
- name: Remove generated folder | ||
run: rm -rf ./examples/sqlite/src | ||
- name: Copy sample database | ||
run: cp ./examples/sqlite/sakila.db . | ||
- name: Generate entities | ||
run: sea-orm-cli generate entity -o examples/sqlite/src/entities -u sqlite://sakila.db | ||
run: sea-orm-cli generate entity -o examples/sqlite/src/entities -u sqlite://sakila.db --seaography | ||
- name: Generate Seaography project | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
|
@@ -135,13 +135,13 @@ jobs: | |
uses: baptiste0928/cargo-install@v2 | ||
with: | ||
crate: sea-orm-cli | ||
version: '0.11.0' | ||
version: '0.12.0-rc.5' | ||
- name: Remove generated folder | ||
run: rm -rf ./examples/sqlite/src | ||
- name: Copy sample database | ||
run: cp ./examples/sqlite/sakila.db . | ||
- name: Generate entities | ||
run: sea-orm-cli generate entity -o examples/sqlite/src/entities -u sqlite://sakila.db | ||
run: sea-orm-cli generate entity -o examples/sqlite/src/entities -u sqlite://sakila.db --seaography | ||
- name: Generate Seaography project | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
|
@@ -190,7 +190,7 @@ jobs: | |
uses: baptiste0928/cargo-install@v2 | ||
with: | ||
crate: sea-orm-cli | ||
version: '0.11.0' | ||
version: '0.12.0-rc.5' | ||
- name: Remove generated folder | ||
run: rm -rf ./examples/mysql/src | ||
- name: Create DB | ||
|
@@ -204,7 +204,7 @@ jobs: | |
run: mysql -uroot -h 127.0.0.1 sakila < sakila-data.sql | ||
working-directory: ./examples/mysql | ||
- name: Generate entities | ||
run: sea-orm-cli generate entity -o ./examples/mysql/src/entities -u mysql://sea:[email protected]/sakila | ||
run: sea-orm-cli generate entity -o ./examples/mysql/src/entities -u mysql://sea:[email protected]/sakila --seaography | ||
- name: Generate Seaography project | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
|
@@ -252,7 +252,7 @@ jobs: | |
uses: baptiste0928/cargo-install@v2 | ||
with: | ||
crate: sea-orm-cli | ||
version: '0.11.0' | ||
version: '0.12.0-rc.5' | ||
- name: Remove generated folder | ||
run: rm -rf ./examples/postgres/src | ||
- name: Create DB | ||
|
@@ -264,7 +264,7 @@ jobs: | |
run: psql -q postgres://sea:sea@localhost/sakila < sakila-data.sql | ||
working-directory: ./examples/postgres | ||
- name: Generate entities | ||
run: sea-orm-cli generate entity -o ./examples/postgres/src/entities -u postgres://sea:[email protected]/sakila?currentSchema=public | ||
run: sea-orm-cli generate entity -o ./examples/postgres/src/entities -u postgres://sea:[email protected]/sakila?currentSchema=public --seaography | ||
- name: Generate Seaography project | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
|
@@ -275,7 +275,7 @@ jobs: | |
- name: Depends on local seaography | ||
run: sed -i '/^\[dependencies.seaography\]$/a \path = "..\/..\/"' ./examples/postgres/Cargo.toml | ||
- name: Fix Nullable not implemented for Vec<String> and tsvector | ||
run: sed -i "25,27d" ./examples/postgres/src/entities/film.rs | ||
run: sed -i "26,27d" ./examples/postgres/src/entities/film.rs | ||
- name: Build example | ||
working-directory: ./examples/postgres | ||
run: cargo build | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,7 @@ Setup the [sakila](https://github.com/SeaQL/seaography/blob/main/examples/mysql/ | |
|
||
```sh | ||
cd examples/mysql | ||
sea-orm-cli generate entity -o src/entities -u mysql://user:[email protected]/sakila | ||
sea-orm-cli generate entity -o src/entities -u mysql://user:[email protected]/sakila --seaography | ||
seaography-cli ./ src/entities mysql://user:[email protected]/sakila seaography-mysql-example | ||
cargo run | ||
``` | ||
|
@@ -205,7 +205,7 @@ Setup the [sakila](https://github.com/SeaQL/seaography/blob/main/examples/postgr | |
|
||
```sh | ||
cd examples/postgres | ||
sea-orm-cli generate entity -o src/entities -u postgres://user:pw@localhost/sakila | ||
sea-orm-cli generate entity -o src/entities -u postgres://user:pw@localhost/sakila --seaography | ||
seaography-cli ./ src/entities postgres://user:pw@localhost/sakila seaography-postgres-example | ||
cargo run | ||
``` | ||
|
@@ -214,7 +214,7 @@ cargo run | |
|
||
```sh | ||
cd examples/sqlite | ||
sea-orm-cli generate entity -o src/entities -u sqlite://sakila.db | ||
sea-orm-cli generate entity -o src/entities -u sqlite://sakila.db --seaography | ||
seaography-cli ./ src/entities sqlite://sakila.db seaography-sqlite-example | ||
cargo run | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.