834 Commits

Author SHA1 Message Date
Charles Chege
52f38a10ea Support the use of chrono::DateTime<Utc> in sea-orm
Add documentation for this

Temporarily use a fork to include new Sea-query code

Add tests for DateTimeUtc

Solve Github actions error by add the code to create a table

Assertion accuracy tests

Rectify incorrect format
2022-02-01 14:27:33 +08:00
Billy Chan
15dc9576ea
Add max_lifetime connection option 2022-01-28 11:51:44 +08:00
Billy Chan
76c0d7fff5
Name conflict of foreign key constraints when two entities have more than one foreign keys (#417)
* fix: name conflict of foreign key constraints when two entities have more than one fk

* test: update test case's foreign keys

* feat: override default name of foreign key constraint
2022-01-28 01:03:24 +08:00
Chris Tsang
946a03b426
Merge pull request #446 from sunli829/master
Add Poem example
2022-01-23 17:31:39 +08:00
Sebastian Pütz
949e3115f5 Make TransactionStream::build sync 2022-01-19 23:55:26 +01:00
Sebastian Pütz
f012ccaec3 Add Send bound to streams. 2022-01-19 20:46:10 +01:00
Billy Chan
0f5516b6bf
fix: support up to 6-ary composite primary key (#423) 2022-01-14 01:16:39 +08:00
Sunli
211029356c Add Poem example 2022-01-13 12:24:42 +08:00
Chris Tsang
6120d82924 cargo fmt 2021-12-26 00:36:33 +08:00
Chris Tsang
d5c9c65079 Revert save to return Self 2021-12-26 00:13:56 +08:00
Chris Tsang
47cbf50c3c
Merge branch 'master' into pulls/361 2021-12-25 17:41:29 +08:00
Billy Chan
17631512bb
feat(Model): add wrapper method delete 2021-12-21 18:24:05 +08:00
Chris Tsang
09fd9ba725 Docs 2021-12-19 02:23:23 +08:00
Billy Chan
adfb9ead54
Rework ActiveValue (#340)
* WIP

* Fixup

* Fixup

* Update docs & rename `unset`

* Deprecate `Unset()` and reexport `ActiveValue::NotSet`

* Docs

Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2021-12-19 02:22:30 +08:00
Billy Chan
5104cd3573
Insert & Update Return Model (#339)
* Update insert & update API

* Update test cases

* Update README

* Fix clippy warnings

* Fixup

* Fixup
2021-12-18 14:30:10 +08:00
Billy Chan
006d35313b
Fix clippy warnings 2021-12-17 11:39:53 +08:00
Billy Chan
4072e74284
cargo fmt 2021-12-17 11:14:54 +08:00
Billy Chan
f5f6a6774f
Codegen ActiveEnum & Create Enum From ActiveEnum (#348) 2021-12-15 00:52:50 +08:00
Chris Tsang
9ef44be422
Merge pull request #370 from SeaQL/bump-query-dep-to-pr-202 2021-12-15 00:50:53 +08:00
Chris Tsang
7da5b6bf90
Merge pull request #373 from nappa85/master 2021-12-15 00:49:52 +08:00
Billy Chan
66a005237c
Update sea-orm to depends on sea-query 0.20.0 2021-12-12 23:03:11 +08:00
Billy Chan
b9fe878542 Handling MySQL & SQLite timestamp columns 2021-12-11 14:25:45 +08:00
Billy Chan
0f164b62d5
Fix related & linked with enum columns (#376)
* Fix related & linked with enum columns

* Add test cases
2021-12-10 23:41:43 +08:00
Marco Napetti
9a342546f3 use macro to simplify code, add failure boolean 2021-12-10 10:09:09 +01:00
Marco Napetti
aaf11dd265 Into doesn't works 2021-12-09 19:17:41 +01:00
Marco Napetti
4abe8310a5 Per-connection metric 2021-12-09 19:03:46 +01:00
Marco Napetti
6b94673dd9 First metric and tracing implementation 2021-12-09 15:12:41 +01:00
Billy Chan
1aea3f6c6c
Delete::many with TableRef 2021-12-08 15:56:37 +08:00
Billy Chan
af1ffdad83
Rename sea-strum lib back to strum 2021-12-07 17:21:03 +08:00
Billy Chan
1229287fd8
Support Up to 6 Values Composite Primary Key (#353)
* Support up to 6 composite primary key

* Test [issues]

* Test [issues]
2021-12-04 20:57:05 +08:00
lz1998
273dc0dd1a
add offset and limit (#351)
* add offset and limit

* move offset&limit to QuerySelect
2021-12-03 01:12:49 +08:00
Chris Tsang
cc4904993a Readme 2021-11-24 00:56:01 +08:00
Jaebum Lee
bc952b3787 Add TryFromU64 trait for DateTime<FixedOffset>.
The timestamp column (with time zone) generates the field with `chrono::DateTime<chrono::FixedOffset>`.
Sadly, `DeriveEntityModel` macro fails because `TryFromU64` is not implemented for this type.

I added the trivial implementation for `chrono::DateTime<chrono::FixedOffset>`.
2021-11-21 23:36:13 -08:00
Chris Tsang
d952a3e42a Readme 2021-11-21 17:57:33 +08:00
Chris Tsang
af3632de11 New tagline 2021-11-21 17:46:47 +08:00
Billy Chan
65f9c70dd3
cargo fmt 2021-11-18 18:07:24 +08:00
Billy Chan
f72f65a4d4
Refactor test case 2021-11-18 18:07:09 +08:00
Chris Tsang
0deedddf28
Merge pull request #292 from SeaQL/returning
Returning
2021-11-17 17:41:28 +08:00
Chris Tsang
aff988bd94
Merge pull request #324 from SeaQL/hotfix-custom-types
Unknown types could be a newtypes instead of `ActiveEnum`
2021-11-17 16:47:28 +08:00
Billy Chan
0f904e02f0
Refactoring 2021-11-17 10:38:02 +08:00
Billy Chan
cef51ddd3f
Use SeaQL/sea-query#188 2021-11-16 18:45:21 +08:00
Billy Chan
42404eb525
Fixup 2021-11-16 17:56:22 +08:00
Billy Chan
7298fdeda9
Rewrite doctests 2021-11-16 17:35:49 +08:00
Billy Chan
f9d04fc73f
Hotfix - separate counter for mock exec & query 2021-11-16 17:21:44 +08:00
Billy Chan
4c147a2d24
Rewrite doctests 2021-11-16 16:27:54 +08:00
Billy Chan
9655805316
Will fail, as expected 2021-11-16 15:54:17 +08:00
Billy Chan
d5de8b1c48
Should fail 2021-11-16 15:38:22 +08:00
Billy Chan
fd50ffd5ea
Merge remote-tracking branch 'origin/master' into returning 2021-11-16 14:44:12 +08:00
Billy Chan
36886e74cd
Testing & fixup 2021-11-16 12:04:21 +08:00
Josh
2b87a8ba32 Pass the argument entity.table_ref() instead of just entity. 2021-11-15 17:10:02 +08:00