28 Commits

Author SHA1 Message Date
Sanford Pun
5143307b3e
Demonstrate how to mock test SeaORM by separating core implementation from the web API (#890)
* Move core implementations to a standalone crate

* Set up integration test skeleton in `core`

* Demonstrate mock testing with query

* Move Rocket api code to a standalone crate

* Add mock execution

* Add MyDataMyConsent in COMMUNITY.md (#889)

* Add MyDataMyConsent in COMMUNITY.md

* Update MyDataMyConsent description in COMMUNITY.md

* Update COMMUNITY.md

Chronological order

* [cli] bump sea-schema to 0.9.3 (SeaQL/sea-orm#876)

* Update CHNAGELOG PR links

* 0.9.1 CHANGELOG

* Auto discover and run all issues & examples CI (#903)

* Auto discover and run all [issues] CI

* Auto discover and run all examples CI

* Fixup

* Testing

* Test [issues]

* Compile prepare_mock_db() conditionally based on "mock" feature

* Update workflow job to run mock test if `core` folder exists

* Update Actix3 example

* Fix merge conflict human error

* Update usize used in paginate to u64 (PR#789)

* Update sea-orm version in the Rocket example to 0.10.0

* Fix GitHub workflow to run mock test for core crates

* Increase the robustness of core crate check by verifying that the `core` folder is a crate

* Update Actix(4) example

* Update Axum example

* Update GraphQL example

* Update Jsonrpsee example

* Update Poem example

* Update Tonic example

* Cargo fmt

* Update Salvo example

* Update path of core/Cargo.toml in README.md

* Add mock test instruction in README.md

* Refactoring

* Fix Rocket examples

Co-authored-by: Amit Goyani <63532626+itsAmitGoyani@users.noreply.github.com>
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2022-09-23 12:57:43 +08:00
liberwang1013
fff0c87a6d
replaced usize with u64 in PaginatorTrait (#789)
undefined
2022-08-20 22:43:17 +08:00
kyoto7250
dd545441d3
introduce rustfmt (#919)
* introduce rustfmt

* Cargofmt on all sea-orm crates & examples

* Revert testing script

* cargo fmt --manifest-path sea-orm-rocket/Cargo.toml --all

* add a script for formatting

* add nightly component for formatting

* set timeout and manual nightly install  in github action

* add flag for manifest-path

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2022-08-01 18:30:43 +08:00
XiaoQu
987c6b55fd
fix #817 add 404 handle for actix 4 example & update readme for (#818)
* feat: add global 404 page

* docs: add cargo-watch install on README file
2022-06-26 15:35:22 +08:00
Billy Chan
c3db8f4b65
Examples: entity & application crate depends on SeaORM with minimum required features enabled (#723) 2022-05-14 13:24:39 +08:00
Billy Chan
498c0154ca Restructure SeaORM migration
Bump codegen's sea-query version [cli]

Update CLI subcommand method

Move migration utility into sea-orm-migration
2022-05-09 12:30:55 +08:00
Cobalt
6a22207944
chore: Upgrade to Actix Web 4 (#638)
* chore: Upgrade to actix-web 4

* fix: Update example names for CI tests
2022-04-02 22:00:49 +08:00
Billy Chan
f418c4e580
Examples with migration (#509)
* Update examples sea-orm version

* Update example sea-schema version

* Update [cli] sea-schema version

* Fix [cli] cargo publish failed

* Update CHANGELOG

* Edit rocket example

* Poem example with migration

* Axum example with migration

* Refactoring

* Actix4 example with migration

* Actix example with migration

* Use sea_schema::migration::prelude
2022-02-09 11:45:04 +08:00
Billy Chan
2d5aa2a61b
Log with tracing-subscriber (#399)
* chore: log examples with tracing-subscriber

* chore: log [issues] with tracing-subscriber

* chore: log [cli] with tracing-subscriber

* feat: tracing will emit log if tracing-subscriber is not setup
2021-12-24 23:59:37 +08:00
Billy Chan
ac804a1642
Imports PaginatorTrait by default making it backward compatible 2021-11-10 15:26:29 +08:00
jasper
4b11a10680 Update examples and test 2021-11-09 22:29:48 +08:00
Chris Tsang
2346d0beb8 Cargo fmt 2021-09-21 18:19:52 +08:00
Chris Tsang
547429c377 Sort by id 2021-09-21 18:19:21 +08:00
Chris Tsang
d6f0d3c35a Fix clippy warnings 2021-09-21 18:13:48 +08:00
Chris Tsang
f7b42ebc0e Clean up Cargo.toml 2021-09-21 18:04:26 +08:00
Sam Samai
ac8d84ea44 Just clone the state for each thread 2021-09-21 18:21:55 +10:00
Sam Samai
8a618f88c7 Start from page 1 2021-09-20 21:00:51 +10:00
Sam Samai
daa5ff77c0 Define SharedState type 2021-09-20 20:55:22 +10:00
Sam Samai
31bc662f3f Use Arc to pass database connection to requests 2021-09-19 21:16:43 +10:00
Sam Samai
d623474d7c Refactor flash 2021-09-17 20:17:17 +10:00
Sam Samai
8b46a89e2c Add flash messages 2021-09-16 22:47:11 +10:00
Sam Samai
237dcaa6a9 Delete post 2021-09-12 21:08:39 +10:00
Sam Samai
c427e4e89b Edit post 2021-09-12 19:21:01 +10:00
Sam Samai
f97c081c2a Add new post 2021-09-12 17:12:20 +10:00
Sam Samai
2e8016d23c List posts with pagination 2021-09-12 16:35:43 +10:00
Sam Samai
1ba6b0b647 List posts from the DB 2021-09-12 11:39:53 +10:00
Sam Samai
8f3a45e6ae Use tera template and serve static assets 2021-09-12 10:07:00 +10:00
Sam Samai
1c1283ca66 Actix example init 2021-09-11 17:02:59 +10:00