1250 Commits

Author SHA1 Message Date
Chris Tsang
09e2ac841a Fix sea-orm dependency 2022-02-06 00:07:18 +08:00
Chris Tsang
d7cdc4ff7d Temporary fix 2022-02-06 00:03:32 +08:00
Chris Tsang
cf793aaf38
Merge pull request #494 from smrtrfszm/master
Remove `r#` prefix when deriving `FromQueryResult`
2022-02-05 23:38:53 +08:00
Billy Chan
21216f3a97
Codegen column_name proc_macro attribute (#433)
* feat: codegen `column_name` proc_macro attribute

* test: codegen `column_name`
2022-02-05 21:14:10 +08:00
Chris Tsang
3cde517d2a Fix sea-schema dependency 2022-02-05 20:58:22 +08:00
Chris Tsang
e305c6669c
Merge pull request #493 from SeaQL/max-lifetime-connection-opt
Add `max_lifetime` connection option
2022-02-05 20:50:39 +08:00
Chris Tsang
646990ed6d
Merge pull request #495 from tasn/patch-1
Fix FromQueryResult when Result is redefined
2022-02-05 20:49:27 +08:00
Billy Chan
8eb095385d Migration (#335)
* Refactor `ConnectionTrait`

* Refactoring

* Build index & foreign key statements

* Fix imports

* Fixup

* Rocket example with migration

* async-std compatible with the tokio 1.0 runtime

* Use reexported dependency

* Compile without selecting any db backend

* Updating sea-orm-cli dep

* sea-orm-cli migrate commands

* cargo fmt

* Test [cli]

* Refactoring

* Clap app name should be "sea-orm-cli"

* Correctly capture MIGRATION_DIR

* Rename README

* Add `sea-orm-cli migrate init` command

* Update README

* Try restructured sea-query dependency (SeaQL/sea-schema#41)

* Set `DATABASE_URL` environment variable
2022-02-05 20:34:54 +08:00
Billy Chan
5a2ccf5a29 Fully quantity std::result::Result in proc_maros 2022-02-01 15:04:58 +02:00
Chris Tsang
e63d463155
Merge pull request #489 from SeaQL/date-time-utc-local
Support `DateTime<Utc>` & `DateTime<Local>`
2022-02-01 15:25:39 +08:00
Chris Tsang
7f3ad2e582 Update sea-query dependency 2022-02-01 14:29:16 +08:00
Billy Chan
8145088814 Refactoring
`ColumnDef` with default value

Cargo fmt

Update docs

Fixup

Support `DateTimeLocal`

Update docs

Codegen write db timestamp column as `DateTimeUtc` type

Update dependency

Merge branch 'sea-query/add-new-column-ref' into pr/429

feat: apply alias on `ColumnRef::SchemaTableColumn`
2022-02-01 14:29:03 +08:00
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
Tom Hacohen
30e7625300
Fix FromQueryResult when Result is redefined
Macros should only ever use absolute import paths.
Shorthands can clash (as they have in my case).
2022-01-30 13:00:02 +02:00
Szepesi Tibor
660f23313e
Remove r# prefix from column name when field has a raw identifier 2022-01-29 18:14:23 +01: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
Billy Chan
2e038a7eae
feat: allow model with generics attribute (#400) 2022-01-14 01:18:13 +08:00
Billy Chan
0f5516b6bf
fix: support up to 6-ary composite primary key (#423) 2022-01-14 01:16:39 +08:00
Billy Chan
a9fc52009e
CLI allow generate entity with url without password (#436)
* fix: cli allow generate entity with url without password

* test: no password test case should not panic

* test: fix test cases, assert panic message
2022-01-14 00:46:32 +08:00
Sunli
211029356c Add Poem example 2022-01-13 12:24:42 +08:00
Chris Tsang
82bad4a376 0.5.0 2022-01-01 16:05:36 +08:00
Billy Chan
aa7254179f
Prepare for 0.5.0-rc.1 (#404)
* docs: edit changelog

* test: update examples' sea-orm version

* docs: edit changelog
2021-12-31 00:41:47 +08:00
Chris Tsang
da21e79bb5 sea-orm-rocket 0.5.0-rc.1 2021-12-29 00:53:09 +08:00
Chris Tsang
4b7234a959 0.5.0-rc.1 2021-12-26 02:43:14 +08:00
Chris Tsang
cb26ed35bf sea-orm-macros 0.5.0-rc.1 2021-12-26 02:30:27 +08:00
Chris Tsang
be5badf578 sea-orm-cli 0.5.0-rc.1 2021-12-26 02:28:28 +08:00
Chris Tsang
9beb572afb sea-orm-codegen 0.5.0-rc.1 2021-12-26 02:27:44 +08:00
Chris Tsang
33b5f2374b Community.md 2021-12-26 01:12:04 +08:00
Chris Tsang
e7d79628b2 Community.md 2021-12-26 01:00:24 +08:00
Chris Tsang
9c5abe5892 Update Readme 2021-12-26 00:37:33 +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
cf685fed26 Bump sea-schema 2021-12-25 18:32:20 +08:00
Chris Tsang
c31227a8bc
Merge pull request #361 from SeaQL/pulls/361
Rename `sea-strum` lib back to `strum`
2021-12-25 18:30:54 +08:00
Chris Tsang
47cbf50c3c
Merge branch 'master' into pulls/361 2021-12-25 17:41:29 +08:00
Chris Tsang
b67ccc3800
Merge pull request #401 from SeaQL/pr-no-inline-clippy-warmings
PR without clippy warmings in file changed tab
2021-12-25 17:16:43 +08:00
Billy Chan
4980810867
ci: run simple clippy 2021-12-25 14:01:56 +08:00
Chris Tsang
2bc5863977 Remove issues/386 2021-12-25 11:33:21 +08:00
Billy Chan
9036d27da7
Codegen SQLite (#386)
* Codegen SQLite

* Remove debugging

* Fixup

* Add SQLite "sakila.db" demo [issues]
2021-12-25 11:31:47 +08:00
Billy Chan
2d5aa2a61b
Log with tracing-subscriber (#399)
* chore: log examples with tracing-subscriber

* chore: log [issues] with tracing-subscriber

* chore: log [cli] with tracing-subscriber

* feat: tracing will emit log if tracing-subscriber is not setup
2021-12-24 23:59:37 +08:00
Chris Tsang
695fa57f4e
Merge pull request #378 from SeaQL/dev-tooling-setup-db
Add docker create script for contributors to setup databases locally
2021-12-24 23:57:18 +08:00
Chris Tsang
65fe5910ec
Merge pull request #396 from SeaQL/active-value-continue
Add wrapper method `ModelTrait::delete`
2021-12-24 23:51:08 +08:00
Billy Chan
96a776ae9d
test(Schema): add test cases for Schema::create_enum_from_entity & Schema::create_enum_from_active_enum 2021-12-22 16:14:17 +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
acf8eac441
Show tracing log only when test failed 2021-12-17 12:52:33 +08:00