173 Commits

Author SHA1 Message Date
Billy Chan
e96fa73a4f
README 2024-10-15 15:56:32 +08:00
Billy Chan
78e0c0584d
README 2024-10-15 15:22:07 +08:00
Chris Tsang
e6af647ed4 README 2024-10-14 12:54:14 +01:00
Chris Tsang
8475ea0346 pub use sqlx 2024-08-02 10:13:59 +01:00
Chris Tsang
7678624cd9 README 2024-05-28 16:29:46 +01:00
Chris Tsang
e75fa6aa49 README 2024-05-28 16:29:19 +01:00
Chris Tsang
3865ca3729 README 2024-05-28 16:28:34 +01:00
Chris Tsang
4ae267d808 README 2024-05-28 16:24:24 +01:00
Billy Chan
b575072aa5
README 2024-05-28 16:01:06 +08:00
Billy Chan
b866236704
examples: deprecate actix3_example (#2154) 2024-03-13 13:46:53 +08:00
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
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
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
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
Chris Tsang
c86744c686 Readme 2023-08-10 01:38:32 +01: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
Chris Tsang
33fc350e76 Readme 2023-07-30 06:00:14 +08:00
Chris Tsang
c5529b33f9 Readme 2023-07-27 14:29:38 +01:00
Chris Tsang
ae8dcceb43 Community Survey 2023-07-27 19:11:17 +08:00
Chris Tsang
ad33d7745d Readme 2023-07-26 19:07:36 +08:00
Chris Tsang
2ce41fa6f2 Readme 2023-07-26 18:59:16 +08:00
Chris Tsang
a5f2ae69e9 Organize entity prelude 2023-07-13 16:53:24 +01:00
darkmmon
866025a733
implement DeriveIden in sea-orm only (#1740)
* WIP, implementing Iden

* completed implementation for DeriveIden and added basic test cases

* added feature flag to prevent sea-orm::sea-query::DeriveIden from crashing when sea-query is not used

* fixed doc test and adjusted test case

* enable `sea-query-derive`'s `sea-orm` feature

* Bump `sea-query-derive` to v0.4

* Update Cargo.toml

* Update Cargo.toml

* adjusted test cases and updated so that iden attribute will not be snake cased

* Update Cargo.toml

* Update main.rs

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2023-07-13 16:28:35 +08:00
darkmmon
902c0ed5ff
DeriveDisplay macro for enum (#1726)
* WIP

* WIP

* WIP

* changed from storing ident to storing TokenStream internally

* Push for code sharing

* fmt

* changing test target to string

* updated Display not showing extra single quote, fixed clippy

* removed DeriveDisplay for test case not using display trait

* added test cases for display_value attribute

* Remove useless clone

* Add comment

* Remove useless clone

* Rename method

* Refactoring

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2023-07-10 11:51:19 +08:00
Panagiotis Karatakis
3300336b1a
Expand SeaORM entity generator with Seaography related data (#1599)
* Add DeriveRelatedEntity macro

* Add generation for related enum and seaography

* Add seaography cli param

* update codegen tests

* Fix DeriveRelatedEntity macro doc and includes

* Fix all RelatedEntity variants for RelationBuilder

* Add tests for code

* Cargo format

* Fix clippy code

* Fix format

* Fix unit tests

* Fix unit tests

* Provide default for seaography::RelationBuilder

* Update changelog

* Update tests

* Modify code to match feedback
* Bring old Related Impl trait generation
* Modify DeriveRelatedEntity to gen impl seaography::RelationBuilder
* Generate RelatedEntity enum when seaography flag is enabled

* Update documentation

* Update Changelog

* Fix format errors

* Fix code generation
* relations with suffix are definition based
* Rev => Reverse easier to read
* snake_case to cameCase for name generation

* Fix unit tests

* Update lib.rs

* derive `seaography::RelationBuilder` only when `seaography` feature is enabled

* Try constructing async-graphql root for "related entity" and "entity" without relation

* Update demo

* CHANGELOG

* Update Cargo.toml

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>

* Revert "Update Cargo.toml"

This reverts commit 6b1669836a4fb5040bfb08999f0cf640c74dc64d.

---------

Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2023-05-19 22:14:46 +08:00
ForzenString
744e063222 add SelectColumns only modify select columns
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`
2023-04-26 18:28:44 +08:00
Billy Chan
2eda8aa3f2
Drop the use of sea-strum and depends on the original strum with a tailored EnumIter provided (#1535)
* Update heck dependency

* Fix formatter error

* Drop the use of `sea-strum` and depends on the original `strum` with a tailored `EnumIter` provided

* fmt

* Depends on `strum` 0.23

* Depends on `strum` 0.24

* Source code adapted from https://github.com/Peternator7/strum

* Update LICENSE

---------

Co-authored-by: Sergei Ivankov <sergeiivankov@pm.me>
Co-authored-by: Sergei Ivankov <96142843+sergeiivankov@users.noreply.github.com>
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2023-03-22 11:47:15 +08:00
Billy Chan
91c4930391
Cleanup panic and unwrap (#1231)
* Add clippy linter checks

* Mock

* InnerConnection

* panic -> Err

* panic -> Err

* More panic -> Err

* Replace unwrap

* Fix clippy

* add clippy linters

* Refactor

* Dump DbErr::Mock

* Revert if...else rewrite

* Remove except

* DbErr helper functions

* Fix clippy

* Negative SQLite last_insert_rowid throw unreachable

* Update panics docs

* Fixup

* Fixup

* Fixup

* Fixup

* Revert adding `ExecResultHolder::Disconnected`

* More fixup

* Fix

* Revert adding `QueryResultRow::Disconnected`

* Fix

* Refactoring

* Fix

* Refactoring

* More refactoring

* More refactoring

* Fix

* Revert `InnerConnection::Disconnected`

* Revert breaking changes

* Fix

* Fix

* Fix

* Refactor `.take().expect()`

* Revert changing `if ... else` to `match` block

* Revert changing return type of `MockDatabaseConnection` transaction method

* Borrow sqlcipher_key

* Fetching unsupported type from query result will thrown `DbErr::Type(...)` error

* Revert adding `DatabaseConnection::try_into_transaction_log()` method

* Refactoring

* Refactoring
2023-02-02 00:02:53 +08:00
Chris Tsang
2cb9824a18 Mascot 2023-01-10 16:45:38 +08:00
Billy Chan
e246d3faaf
Cont. Upgrade to SeaQuery 0.28.0 (#1366)
* Upgrade to SeaQuery 0.28.0

* Remove unnecessary heap allocation

* Upgrade sea-query-binder

* Upgrade sea-schema

* Fix

* Upgrade sea-schema

* refactoring

Co-authored-by: Ivan Krivosheev <py.krivosheev@gmail.com>
2023-01-05 20:41:28 +08:00
Chris Tsang
19f0ecd0bc Readme 2022-11-16 14:09:48 +08:00
Chris Tsang
0ac8ff8db7 Update Spyglass 2022-11-16 13:53:09 +08:00
Billy Chan
a0b3c58c5f
README 2022-11-14 14:43:14 +08:00
Billy Chan
0ca62ba145
Links to cookbook 2022-10-13 21:24:17 +08:00
Billy Chan
3c19d7c3e4
Exclude test_cfg module from SeaORM (#1077) 2022-10-06 23:45:09 +08:00
Horu
49c1a6d716
docs(readme): fix architecture link (#1086) 2022-10-03 12:12:39 +08:00
Billy Chan
5e34bcecbe
Edit README 2022-08-11 15:39:50 +08:00
Billy Chan
1a2090fb5e
Give a shout-out to our contributors 2022-08-10 13:40:18 +08:00
Billy Chan
710ef7a66b
Add example links 2022-07-26 14:50:55 +08:00
Billy Chan
b0ea1138b4
Update lib.rs 2022-07-07 15:20:43 +08:00
Billy Chan
ab2f784701
(de)serialize custom JSON types - 2 (#794)
* de(serialize) custom JSON types

* Rename DeriveTryGetableFromJson -> FromJsonQueryResult

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-07-01 01:27:46 +08:00