* 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>
* adds find_with_linked test
* WIP(related test)
* mock related test done
* complete relation test
* loader update
* find_with/also_related missing test case for empty from other side
* comments fixup
* revert loader test
* related select test done
* find with/also linked test cases
* removed due to it being functionally same as the new one
* fmt, remove excess import
* improved model generation
* issue related test case #1790
* added loader test cases and slight improvement to find_related/linked
* miscellaneous changes
* added empty insert, merge load_one test case
* completed loader many to many test case, fmt
* removed empty_insert test case for now
* commented insert_test
* added Cargo.toml for issue 1790's folder
* buffed salvo version for ci(0.49 yanked)
* revert version for salvo example
* Add Support For PostgreSQL Arrays In FromQueryResult Implementation Of JsonValue
* Add support for root arrays in JSON in SeaORM #1517
* Refactoring
* Only when `postgres-array` is enabled
* Add test cases
---------
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
* end-of-day commit (WIP)
* progress commit (WIP)
* refactored and added InsertAttempt
* async asjusting
* completed implementation for insertAttempt in execution
Added in tests for insertAttempt
* updated wording for new INSERT type
* removed InsertTrait
* Test suit load environment variable from env files
* Added expr() and exprs() for QuerySelect trait and Minor typo fix
* fmt
* Added doc testing for the new functions
* Remove excess comment for doc test
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
* Remove excess comment for doc test
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
* updated doc tests to make example more realistic
* changed doc test again for more realistic query and added expr_as()
* aligned expr_as() alias input with column_as() input
* update doc test for expr_as() according to previous changes
---------
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
add `PartialModelTrait` for a part of model
re-export `PartialModelTrait`
cargo fmt
add fn`into_partial_model` on `Select`&`SelectTwo`
add `DerivePartialModel` to impl `PartialModel`
add macro `DerivePartialModel` to `sea-orm`
disambiguate `SelectColumns` function
fix macro error
cargo fmt && cargo clippy
move `SelectColumns` from helper.rs to traits.rs
cargo fmt
Reduce nest hell of load attribute argument fetch
✅ test `DerivePartialModel` input parse
`DerivePartialModel` not derive with generic
fix `DerivePartialModel` code generate error
remove unused use
cargo fmt
add `into_partial_model` for `SelectTwoMany`
* Support Vector of enum for Postgres
* Fix clippy
* Add tests for integer array
* Fix dependency
* Bump sea-query to 0.27.2
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
* Implement `IntoActiveValue` for `time` types.
I tried to implement a [custom active
model](https://www.sea-ql.org/SeaORM/docs/advanced-query/custom-active-model/),
and one of the columns was `Option<TimeDateTimeWithTimeZone>`. I got a
compiler error:
```
error[E0277]: the trait bound `std::option::Option<sea_orm::prelude::TimeDateTimeWithTimeZone>: IntoActiveValue<_>` is not satisfied
```
Looking into the source code, it seemed a simple oversight that this
trait was implemented for the `chrono` types but not the `time` types,
and it was easy enough to fix since there's already a macro to implement
it for new types.
I also noticed that the `time` types are not accounted for in
`src/query/json.rs` while the `chrono` types are, which I assume is also
an oversight. However, I don't have a need for that at this point and
the fix for that seemed less trivial, so I'm just bringing it to your
attention.
Thanks for SeaORM!
* Implement `IntoActiveValue` for `Vec<u8>` types
* Add tests to double check and prevent it from happening again
* Add docs
* Fixup
* Serialize `time` types as `serde_json::Value`
Co-authored-by: Jimmy Cuadra <jimmy@jimmycuadra.com>