16 Commits

Author SHA1 Message Date
Billy Chan
a80c33ef4c
Rewrite enum and text casting (#973)
* Rewrite enum and text casting

* Add doc tests

* Refactoring
2022-09-05 00:38:12 +08:00
Billy Chan
6091629adb
cargo fmt 2022-03-25 15:25:49 +08:00
Nick Burrett
a09790ef81
Allow for creation of indexes for PostgeSQL and SQLite (#593)
* Allow for creation of indexes for PostgeSQL and SQLite

PostgreSQL and SQLite do not allow creation of general indexes within a `CREATE TABLE` statement, so a method is required to generate `CREATE INDEX` statements for these.

`create_table_from_entity` avoids creating invalid statements for non-MySQL backends,
forcing uses to explicitly run `create_index_from_entity`.  Ideally creating indexes would be removed from `create_table_from_entity` entirely, but this would introduce a breaking change for MySQL use.

* Remove index creation from create_table_from_entity

Use `create_index_from_entity` for all index creation for consistency across all backends.  This is a backwards incompatible change, affecting those using MySQL backend when creating the schema only.

* Revert change to join_8 test after migration to new indexes entity
2022-03-21 00:45:08 +08:00
Billy Chan
19a572b721
Escape rust keywords with r# raw identifier 2021-10-04 23:30:20 +08:00
Billy Chan
e558dc8584
Move impl Linked to entity_linked module 2021-09-27 12:13:57 +08:00
Billy Chan
a4f2e3c2a8
Test cases with more level of joins 2021-09-27 11:45:19 +08:00
Billy Chan
a45c44cfc5 Add cake_expanded entity file for docs demo 2021-09-17 17:20:07 +08:00
Billy Chan
e76928f1cc Support join on multiple columns 2021-08-14 00:01:40 +08:00
Chris Tsang
0a215f75ed Docs 2021-06-28 02:10:46 +08:00
Chris Tsang
820bbad9de impl IntoMockRow 2021-06-19 02:47:36 +08:00
Billy Chan
62fb43c605
Add unit test for pagination (#20)
* Add unit test for pagination

* End with empty page

* Add more test cases

* Assert transaction log

* Test utils

* Feature gated

* IntoMockRow, derive macro with into MockRow

* Revert derive macro

* WIP

* WIP

* assert_transaction_log
2021-06-18 23:43:07 +08:00
Chris Tsang
7bf8ab0202 Many to many prototype 2021-05-18 00:18:55 +08:00
Chris Tsang
c72d7b0289 Rename 2021-05-09 02:43:40 +08:00
Chris Tsang
7bb521fad2 Comment 2021-05-09 02:25:19 +08:00
Chris Tsang
add2e1ca0c Relation with Fruit 2021-05-08 17:38:55 +08:00
Chris Tsang
9080d16c24 First unit test 2021-05-07 16:50:04 +08:00