Billy Chan
cef380b977
SQLite type mappings ( #2077 )
...
* sqlite: deps
* sqlite: update data type mappings
* sqlite: decimal test cases
* sqlite: try negative numbers
* fixup
* fixup
* fmt
* clippy
* fixup
* fixup
* fixup
* refactor
* fix
* Drop the use of `rust_decimal_macros` (#2078 )
* sqlite: decimal -> real
* revert
* Bump dependencies
* Fixup
* Fixup
* Fixup
* Fixup
* Refactor
* Refactor
* Refactor
2024-02-05 14:42: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
Chris Tsang
93623f0d02
Support MySQL / SQLite
2023-10-16 09:55:30 +01:00
Anshul Sanghi
201d6fe9f9
Add Tests And Fix Build Issue For "Rework active enum" PR ( #1900 )
...
* Add Tests For Root JSON Arrays And Active Enum Vectors
* Fix Build Issue When Using `DeriveActiveEnum`
2023-10-12 16:23:29 +08:00
Chris Tsang
ec581abf56
Fix test
2023-07-26 21:09:25 +01:00
darkmmon
f5a7311794
Derive value type ( #1720 )
...
* progress (WIP)
* WIP
* WIP, finished structure except impl programming
* WIP
* revert event_trigger modification
* adding tests and mods
* completed derive value type
* fixed tests, adjusted code position and completed error messages
* column type commit
* added attribute array_type and column_type for specification
* renamed items and files, and removed debug messages
* move attributes outside of the wrapper struct
* refactored code for type matching, and restructured code in test cases
* clippy fix
* fix(doc): fix salvo framework name (#1731 )
Co-authored-by: 黄景祥 <jingxiang.huang@baishancloud.com>
* fmt
* changed json_vec_test to use DeriveValueType
* fmt
* Revert "changed json_vec_test to use DeriveValueType"
This reverts commit 92bbf3b6e4eca72e0af0af35776aeec3ee035602.
* added test cases for inserting StringVec in a model
* fmt
* Try non-public wrapped type
* Refactoring
---------
Co-authored-by: joelhy <joelhy@gmail.com>
Co-authored-by: 黄景祥 <jingxiang.huang@baishancloud.com>
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2023-07-10 10:48:20 +08:00
Billy Chan
d099669ad8
Cleanup ambiguous glob imports ( #1692 )
...
* Cleanup ambiguous glob imports
* fix
2023-06-06 15:00:05 +08:00
Billy Chan
381e175847
Test CRUD on bit datatype ( #1612 )
2023-05-03 12:41:52 +08:00
Billy Chan
d514b511a4
Showcase how to define entity with dynamic table name ( #1622 )
2023-05-03 11:12:23 +08:00
Billy Chan
6833529441
feat: String
parameters accept any Into<String>
( #1439 )
2023-04-11 12:51:51 +08:00
Billy Chan
4b9038ea71
fix: codegen write binary column definition ( #1529 )
2023-03-10 18:01:33 +08:00
Billy Chan
a6bd91a78b
Use ActiveEnum
field as composite primary key ( #1414 )
...
* Use ActiveEnum field as part of composite primary key
* Try unique constraint failed
2023-01-30 21:47:49 +08:00
Billy Chan
e2b796b093
Cont. feat: expose database connection to ActiveModelBehaviour
's methods ( #1328 )
...
* feat: expose database connection to `ActiveModelBehaviour`'s methods (#1145 )
* Make ActiveModelTrait async
* Add tests
* refactoring
Co-authored-by: teenjuna <53595243+teenjuna@users.noreply.github.com>
2023-01-12 17:22:46 +08:00
Billy Chan
e9df3aa01d
Casting columns as a different data type on select, insert and update ( #1304 )
...
* Cast select and value
* Refactoring
* Test casting Postgres citext
* Fixup
* Revert
* Add test cases
* Fixup
* Rename methods
2023-01-12 14:56:11 +08:00
Billy Chan
4f5a15a99f
Support various UUID formats that are available in uuid::fmt
module ( #1325 )
...
* Support various UUID formats that are available in `uuid::fmt` module
* clippy
* fixup
2023-01-11 14:13:15 +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
Billy Chan
d205338f3f
Try custom vector field ( #1273 )
2022-12-19 17:08:32 +08:00
Billy Chan
08cb44028e
Support bigdecimal::BigDecimal ( #1258 )
...
* Fix: fields with type `Option<T>` are always nullable
* Support BigDecimal
2022-12-01 12:53:19 +08:00
Billy Chan
4d8645ae8b
Support Vector of enum for Postgres ( #1210 )
...
* Support Vector of enum for Postgres
* Fix clippy
* Add tests for integer array
* Fix dependency
* Bump sea-query to 0.27.2
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-11-15 13:50:05 +08:00
Billy Chan
b5b9790252
Support array datatype in PostgreSQL ( #1132 )
...
* PostgreSQL array (draft)
* Fixup
* Fixup
* Fixup
* Fixup
* Fixup
* Refactoring
* generate entity for Postgres array fields
* Add tests
* Update Cargo.toml
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-10-23 18:26:57 +08:00
Billy Chan
77bddd85a5
Fixup
2022-09-22 15:07:37 +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
Billy Chan
fff738a706
cargo fmt
2022-06-21 11:12:28 +08:00
Billy Chan
5cf4d6022b
Vector of string save as serialized format in db ( #783 )
2022-06-12 22:23:30 +08:00
Billy Chan
cdc70f4fd9
Insert Default ( #589 )
...
* Insert default
* Update sea-query
* Fixup
Co-authored-by: Chris Tsang <chris.2y3@outlook.com>
2022-05-09 23:46:38 +08:00
Billy Chan
9687819a7e
Supports time
crate
2022-03-13 18:18:15 +08:00
Chris Tsang
b8a7ae7351
Revert "Insert Default - Inserting ActiveModel
with all attributes NotSet
( #432 )"
...
This reverts commit 33a87d79b1a789e8b47ed21bf22384289af7a487.
2022-02-06 21:52:08 +08:00
Chris Tsang
645a420eb1
cargo fmt
2022-02-06 14:47:45 +08:00
Chris Tsang
33a87d79b1
Insert Default - Inserting ActiveModel
with all attributes NotSet
( #432 )
...
* feat: apply alias on `ColumnRef::SchemaTableColumn`
* build: update sea-query dependency
* feat: insert default
* Use sea-query 0.21
Co-authored-by: Billy Chan <ccw.billy.123@gmail.com>
2022-02-06 14:39:46 +08: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
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
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
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
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
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
36886e74cd
Testing & fixup
2021-11-16 12:04:21 +08:00
Billy Chan
2f7c9ccda7
Refactoring
2021-11-03 10:56:06 +08:00
Billy Chan
0bbb50b7f6
Merge remote-tracking branch 'origin/master' into active-enum
2021-11-03 10:52:29 +08:00
Billy Chan
d22ff0db5e
Fixup
2021-11-02 18:35:36 +08:00
Billy Chan
892c0fe57d
Support Vec<u8>
primary key
2021-11-02 15:20:27 +08:00
Billy Chan
f88c7259fe
Fixup
2021-10-27 12:50:02 +08:00
Billy Chan
55de1968bb
Add create_enum_from_entity
2021-10-27 12:37:35 +08:00
Billy Chan
cf52839c3a
Typo
2021-10-25 17:12:17 +08:00
Billy Chan
4b1cac7f35
Refactoring
2021-10-25 17:05:27 +08:00
Billy Chan
f20c64988d
Tests all DB
2021-10-25 16:52:02 +08:00
Billy Chan
80c72004d1
Try Postgres enum
2021-10-21 15:43:50 +08:00
Billy Chan
d525c710ce
Merge remote-tracking branch 'origin/master' into active-enum
2021-10-20 18:43:39 +08:00
Billy Chan
868a469de0
Test integer enum
2021-10-20 18:02:23 +08:00