958 Commits

Author SHA1 Message Date
Billy Chan
76f73e778d
README 2024-02-02 17:01:25 +08:00
Billy Chan
ab7de834b9
README 2024-02-02 16:51:30 +08:00
Billy Chan
9cd96462e8
Gold Sponsor 2024-02-02 13:35:30 +08:00
Billy Chan
116cfebece
Gold Sponsor 2024-02-02 13:22:13 +08:00
Billy Chan
2adbf8cd22
Gold Sponsor 2024-02-02 13:21:35 +08:00
Chris Tsang
0016eff73b Update 2024-01-28 01:50:43 +00:00
Andrea Corradi
c56c072f27
Enable sqlite returning with feature flag (#2070)
* Enable sqlite returning with feature flag

* Add runtime check for sqlite version

* Apply suggestions from code review

* Fix clippy

* Rename feature

* Fix tests when feature flag is not enabled

---------

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2024-01-26 04:28:59 +08:00
Chris Tsang
4690bafcbd Edit 2024-01-20 22:08:35 +00:00
Chris Tsang
382ffa3054 Add ConnectOptions::test_before_acquire #2066 2024-01-20 22:05:16 +00:00
Chris Tsang
361924336d clippy 2024-01-14 15:55:08 +00:00
Chris Tsang
f27526b79d Changelog 2024-01-14 15:43:57 +00:00
Francis Le Roy
7eb3e12294
Updated the 'QuerySelect' trait to expose 'lock_with_behavior' (#1867) 2024-01-14 23:51:51 +08:00
Maksim Zaborovskiy
c5adb9d1d1
Add cursor pagination desc order (#2037)
* feat: add cursor pagination desc order

* feat: add cursor pagination desc order

* test: add cursor integration tests

* test: add cursor integration tests

* test: add query cursor_by tests

* test: add query cursor_by tests

* test: add query cursor_by tests

* test: add query cursor_by tests

* test: add query cursor_by tests

* test: add query cursor_by sort tests

* chore: remove unused import
2024-01-14 23:23:55 +08:00
Dmitrii Aleksandrov
a73f699578
Cast enums in lt(), lte(), gt(), gte() (#2014)
* Cast enums in lt, lte, gt, gte (revert 10f3de0, discussed under #1527)

* Add tests for enum order comparisons
2024-01-12 22:42:29 +08:00
Anshul Sanghi
f019d6ab22
Add Ability To Configure SQLx Slow Statement Logging Settings (#2055)
* Add Ability To Configure SQLx Slow Statement Logging Settings

* Disable SQLX Slow Statement Logging By Default
2024-01-12 19:16:24 +08:00
Chris Tsang
f54683d365
Refactor/fix clippy errors (#2056) (#2057)
* chore: add clippy config file

* refactor: fix clippy errors and wornings of runtime-async-std-native-tls,sqlx-all

* refactor: fix clippy errors and wornings of sqlx-sqlite, sqlx-mysql, sqlx-postgres

* chore: format

* refactor: fix clippy

* fix: import path

* refactor: fix clippy errors and wornings of sqlx-sqlite, sqlx-mysql, sqlx-postgres

* fix: revert some space and comma removal

* fix: revert some space and comma removal

* refactor: add feature flag

* fix: import path

* test: remove mismatch feature flag

* test: remove mismatch feature flag

* chore: add proper feature flag

* chore: remove feature flag

* refactor: remove clippy.toml file

* fix: re-export driver

* fix: re-export JoinType

* fix: remove feature flag

* chore: add #[allow(unused_imports)] for driver

Co-authored-by: Shogo Nakano <61229807+shogo-nakano-desu@users.noreply.github.com>
2024-01-11 00:21:22 +08:00
Shogo Nakano
3dc66aa17d
refactor: add clear_order_by for num_items (#2030) 2024-01-10 18:30:30 +08:00
Chris Tsang
0ad6c2fb14 Readme 2023-12-16 19:44:32 +00:00
Chris Tsang
84a24bab01 Rename things 2023-12-14 21:13:04 +00:00
Dmitrii Aleksandrov
1abc47b5f1
Cast enums in is_in and is_not_in (#1527) (#2002)
* Cast enums in `is_in` and `is_not_in` (#1527)

* Restore original tests, add tests for generated SQL
2023-12-15 03:41:05 +08:00
Chris Tsang
5859d261f1 Cleanup feature flags 2023-12-14 17:03:16 +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
94eac96513
create_table_from_entity support comment (#2009)
* support table and column comment

* create_table_from_entity support comment

* fmt code

* fmt code

* add comment test

* fix test
2023-12-14 18:22:36 +08:00
Bouke van der Bijl
a1396f3679
Add source annotations to errors (#1999) 2023-12-08 21:50:57 +08:00
Chris Tsang
2eb3d8e465 Cherry pick tests from #1679 2023-12-01 11:29:05 +00:00
Chris Tsang
8210428674 Implement StatementBuilder for sea_query::WithQuery #1960 2023-12-01 10:16:22 +00:00
Chris Tsang
d471c4e022 Change method signature of expr_as to accept self #1979 2023-11-22 22:32:34 +00:00
Chris Tsang
091eb4d85d Readme 2023-10-19 19:30:51 +01:00
Chris Tsang
72e9a140e3 Update Readme 2023-10-19 19:25:48 +01:00
Erik Wegner
fef3a67856
Typo (#1923) 2023-10-20 02:02:26 +08:00
Chris Tsang
93623f0d02 Support MySQL / SQLite 2023-10-16 09:55:30 +01:00
Chris Tsang
b2cb51380a Introduce TryGetableArray 2023-10-04 03:52:40 +01:00
Chris Tsang
0f6a48baa4 Rework ActiveEnum: remove the reliance on ValueVec 2023-10-04 01:53:27 +01:00
Chris Tsang
17c943d84e
Loader: use ValueTuple as hash key (#1868) 2023-09-24 23:03:14 +08:00
Chris Tsang
5a6acd6731 Fix loader panic on empty 2023-09-22 17:31:15 +01:00
Chris Tsang
e61b066b59 Avoid breaking the Cursor API 2023-09-22 17:17:01 +01:00
Ivan Yiu
27ca745208
SelectTwo cursor by, cursorTrait revamp (#1826)
* WIP

* WIP

* test cases for cursor with SelectTwo

* fmt, fix test

* WIP, missing test for also_linked cursor_by

* completed many_to_many relationship

* test fixup

* fmt

* extra order_by to fix test

* WIP

* fixed cursor_by to do ordering implicitly base on both cursor column and primary key from other table

* change from map to for loop to eagerly do order_by

* fix tests
2023-09-23 00:03:04 +08:00
Chris Tsang
edd6c9b362 cargo clippy 2023-08-25 22:02:33 +01:00
Chris Tsang
71afa56569 Bump sea-query 2023-08-25 21:46:20 +01:00
Chris Tsang
af52e86a9c Newline 2023-08-18 13:47:27 +01:00
Chris Tsang
cca65b7875 Slight tweaks 2023-08-18 13:14:52 +01:00
Chris Tsang
08c3441a9c Add more find_also_related test cases
From darkmmon/sea-orm/commit/ce5f6991391fdbb0b8deb72ddd404944bb05cf98
2023-08-18 13:10:31 +01:00
Ivan Yiu
d50312c081
Test cases improvement (#1811)
* 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
2023-08-18 20:02:17 +08:00
Chris Tsang
c86744c686 Readme 2023-08-10 01:38:32 +01:00
Chris Tsang
ef861294e2 Fix clippy 2023-08-04 20:26:12 +01:00
Chris Tsang
f2dfbab3a0 Fix find_with_related #1800 2023-08-04 20:22:07 +01:00
Anshul Sanghi
5fa2c1c28c
Add Support For PostgreSQL Arrays In FromQueryResult Implementation Of JsonValue (#1598)
* 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>
2023-08-02 02:42:16 +08:00
Chris Tsang
63d8cdf7e5 Readme 2023-07-31 08:35:29 +01:00
Chris Tsang
4418227d67 Readme 2023-07-30 06:06:35 +08:00
Chris Tsang
dcd37dea27 Readme 2023-07-30 06:05:38 +08:00