325 Commits

Author SHA1 Message Date
Billy Chan
3e149db180
examples: bump loco-rs to v0.2 (#2102) 2024-02-06 16:26:15 +08:00
Billy Chan
f7f914e198
update examples 2024-02-06 14:14:10 +08:00
Billy Chan
94403b5659
migration: schema helper (#2099)
* Adapted loco-rs/schema.rs

* avoid `&mut ColumnDef` after upgraded to sea-query 0.31.0

* refactoring

* rewrite schema.rs

* revert

* fmt

* fix

* loco_example: pin loco-rs version

* refactor
2024-02-06 14:10:36 +08:00
Billy Chan
cef380b977
SQLite type mappings (#2077)
* sqlite: deps

* sqlite: update data type mappings

* sqlite: decimal test cases

* sqlite: try negative numbers

* fixup

* fixup

* fmt

* clippy

* fixup

* fixup

* fixup

* refactor

* fix

* Drop the use of `rust_decimal_macros` (#2078)

* sqlite: decimal -> real

* revert

* Bump dependencies

* Fixup

* Fixup

* Fixup

* Fixup

* Refactor

* Refactor

* Refactor
2024-02-05 14:42:55 +08:00
Billy Chan
7f25da3e2b
example: loco-todo-list (#2092)
* example: loco-todo-list

* fmt

* Cargo.lock

* Disabled integration test for GitHub CI

* fmt

* Update Cargo.toml
2024-02-05 14:35:37 +08:00
Chris Tsang
b5804551eb update examples 2024-01-22 09:48:29 +00:00
Chris Tsang
f16bac9a9f Edit 2024-01-21 17:17:17 +00:00
Chris Tsang
9b53db99c3 Edit 2024-01-21 17:17:09 +00:00
Chris Tsang
c2e6e54a50 Update Rocket 2024-01-21 16:17:23 +00:00
Chris Tsang
ca6f381d28 update examples 2024-01-14 16:10:33 +00:00
Chris Tsang
4ecf47e087 update examples 2023-12-14 19:42:32 +00:00
Chris Tsang
5539e7c5ad Stash proxy_surrealdb_example for now 2023-12-14 01:10:13 +00:00
Chris Tsang
955bbcbc12
Database Proxy (#2000)
* feat: Add proxy connection type

* feat: Add proxy database's proxy functions trait.

* fix: Remove some unused impl to fix the unit test

* test: Create the proxy by empty declaration.

* test: Try to genereate query and exec commands.

* perf: Add more query debug trait for debugging.

* chore: Add the example for wasi + proxy.

* chore: Try to read string from wasmtime vm.

* chore: Sucks, but how to do without tokio::spawn?

* chore: Complete the basic memory read logic.

* chore: Abandon the WASI demo, native demo first...

* refactor: Use single proxy connection generator
to avoid stack overflow

* refactor: Rename the inner structs' name

* fix: Fix CI clippy and unit test

* fix: Rename the example.

* chore: Try to embed surrealdb for proxy test.

* fix: Transfer the query result correctly.

* refactor: Rename the example.

* chore: Ready to add example for wasmtime proxy.

* feat: Try to compile sea-orm into wasm binary.
But it would failed on wasm32-wasi target because of the socket deps.
It can be compiled on wasm32-unknown-unknown target.

* fix: WASM targets can't use sqlx.

* fix: Try to fix CI by remove toml.

* fix: Try to fix CI by remove toml.

* fix: Move vm to the example's root dir.

* fix: Add a pre-build script.

* chore: Add README.

* fix: Try to fix CI.

* feat: Add proxy logic in wasm module.

* fix: Try to run the wasi module.
But WASI cannot support multi threads..
so the module was run failed.

* refactor: Bump wasmtime to 14.

* fix: Now we can use async traits on wasmtime.
The solution is add the current thread tag to tokio-wasi.

* build: Use build.rs instead of dynamic command.

* feat: Add the execute result's transfer logic.

* fix: Convert sqlx query result for sea-query.

* fix: Now we can transfer wasm's query to outside.

* refactor: Convert to ProxyRow first.
It's the solution to know the type information about the value.

* fix: Multiple time library reference.

* feat: Add a new proxy example which uses GlueSQL.

* test: Add the test cases for three new examples.
Just try to run once...

* ci: Add wasm component's compiler for unit test.

* ci: Add wasi target.

* ci: It may needs wasi target twice...

* feat: Add more keys for proxy execute result.
To transfer the fully information of the execute result.

* fix: Use custom id type instead of json value.

* fix: Wrong reference type.

* fix: Rewrite the transformer.

* perf: Add ToString trait for proxy exec result.

* revert: Again.
Refs: 9bac6e91ca9df04ccd8368906e1613cfc5b96218

* revert: Back to the basic proxy exec result.
Refs: e0330dde73a54d461d5f38c69eec5e13bcc928d4

* refactor: Update GlueSQL and SurrealDB examples. (#1980)

* refactor: Bump gluesql to 0.15
Relate to https://github.com/gluesql/gluesql/issues/1438

* Use SQLParser to parse and replace placeholders.

* Use SQLParser for surrealdb demo.

* Transform the query by SQLParser.

* Tweaks

* Remove wasmtime example. (#2001)

* ci: Add additional targets.

* Remove proxy wasmtime example.

* Format

---------

Co-authored-by: 伊欧 <langyo.china@gmail.com>
Co-authored-by: 伊欧 <m13776491897@163.com>
2023-12-14 19:40:55 +08:00
ttys3
3ff4f11cb7
upgrade to Axum 0.7 (#1984)
* refactor: upgrade to axum 0.7

* refactor: upgrade to axum 0.7
2023-11-28 02:28:49 +08:00
Chris Tsang
8aa49beb6d update examples 2023-11-13 09:03:26 +00:00
Chris Tsang
5d677a401b update examples 2023-11-12 20:14:30 +00:00
Chris Tsang
418c18ac0a Update sea-orm-rocket-example 2023-11-06 12:38:01 +00:00
Wyatt Herkamp
8b8b2ae391
Update Rocket (#1959) 2023-11-06 19:04:18 +08:00
Chris Tsang
e9acabd847 Fixup 2023-10-19 19:51:22 +01:00
Chris Tsang
3796ce40ad update examples 2023-10-19 19:28:46 +01:00
Chris Tsang
619b773ea2 Fixup 2023-10-19 19:27:39 +01:00
Vladlen
6e94335a69
fix(examples): rename duplicate service example (#1919) 2023-10-20 02:05:18 +08:00
Chris Tsang
13a74db184 update examples 2023-09-22 18:13:27 +01:00
Chris Tsang
2a8efed98d Update salvo to 0.50 2023-08-18 12:51:02 +01:00
Chris Tsang
43e2b9d314 update examples 2023-08-04 20:44:06 +01:00
Chris Tsang
727390b8d2 Revert unintended code changes.
This reverts commit ef861294e2987c5c2cc1fc2b909c72aaf2132ca5.
2023-08-04 20:39:38 +01:00
Chris Tsang
ef861294e2 Fix clippy 2023-08-04 20:26:12 +01:00
Chris Tsang
dd1def8bf3 Readme 2023-07-31 08:19:36 +01:00
Chris Tsang
81158da9c6 Readme 2023-07-30 06:16:34 +08:00
Chris Tsang
3a72c61bcc Readme 2023-07-30 06:07:35 +08:00
Chris Tsang
33fc350e76 Readme 2023-07-30 06:00:14 +08:00
Chris Tsang
7af76fc753
Seaography example WIP (#1788)
* Seaography example WIP

* Seaography example

* Screenshot
2023-07-30 05:08:28 +08:00
Chris Tsang
d7d45ae669 update examples 2023-07-27 15:01:42 +01:00
Chris Tsang
96087291c2 0.12.0-rc.5 2023-07-25 16:28:35 +08:00
darkmmon
84be56e01a
update example's dependency versions (#1759)
* version update, all examples marked with #notcomplete does not compile with cargo run

* WIP

* salvo example fixed

* testing, and boost a minor version

* fmt

* build dependency update

* CI

* cleanup

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2023-07-25 16:12:44 +08:00
Chris Tsang
ae899d6744 Remove sea-query's Iden macro 2023-07-13 10:36:56 +01:00
Chris Tsang
a42a9a1d3d update examples 2023-07-08 00:14:02 +08:00
joelhy
986f0c2d49
fix(doc): fix salvo framework name (#1731)
Co-authored-by: 黄景祥 <jingxiang.huang@baishancloud.com>
2023-06-29 23:44:52 +08:00
Chris Tsang
6bb7bb30fa update examples 2023-06-22 07:06:48 +08:00
df51d
0b15f4f5e2
change: rename core crate to service in examples (#1662)
* change: rename `core` crate to `service` in examples

* fix(jsonrpsee-example): broken dependency
2023-05-23 10:33:44 +08:00
Billy Chan
9ca01b3e7c
Upgrade tracing-subscriber dependency to 0.3.17 (#1609)
* Upgrade `tracing-subscriber` dependency to 0.3.17

* Revert "fix: `regex` dep should enable `unicode` feature (#1605)"

This reverts commit 41d9a853342155e0b7df4afb15990225b1c8a981.
2023-04-24 14:21:15 +08:00
Billy Chan
ca09ac9333
update examples 2023-03-16 18:28:04 +08:00
Billy Chan
6b1463ddd0
update examples 2023-03-10 22:13:03 +08:00
Billy Chan
4f8ad56cc4
Cont. Added support for using sea-orm with #[deny(missing_docs)] (#1531)
* Added support for using sea-orm with #[deny(missing_docs)] (#1522)

* feat(macros): Added documentation tags for generated entities

* chore: Added deny(missing_docs) attribute to basic example

* chore: Fix clippy errors

* ci: test missing docs of derive macros generated types

* Try missing docs (CI should fail)

* Revert "Try missing docs (CI should fail)"

This reverts commit 83356bfca8939e7807f14bad8bb816fcabc1bf7b.

---------

Co-authored-by: Lewin Probst, M.Sc <30552361+emirror-de@users.noreply.github.com>
2023-03-10 21:49:08 +08:00
Chris Tsang
f9caf9d6dd update examples 2023-02-07 02:51:00 +08:00
Chris Tsang
c4df4999f2 update examples 2023-02-04 16:10:21 +08:00
Chris Tsang
d07f840830 Improve example 2023-02-03 13:57:12 +08:00
Chris Tsang
56e4b4337b Improve API & Example 2023-02-02 11:21:00 +08:00
Chris Tsang
f66834f6e6 update examples 2023-02-01 23:46:42 +08:00
Billy Chan
4e3a45c2f7
Fix clippy warnings (#1436) 2023-01-31 15:52:57 +08:00