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
Billy Chan
9797da1ee4
Drop the use of rust_decimal_macros
( #2078 )
2024-01-24 17:58:50 +08: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
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
77ae46f85f
Merge pull request #1898 from SeaQL/rework-active-enum
...
Rework ActiveEnum to support TryGetable for Vec<Json>
2023-10-16 10:05:08 +01:00
Chris Tsang
93623f0d02
Support MySQL / SQLite
2023-10-16 09:55:30 +01:00
Chris Tsang
d29ed5b9bb
Avoid repeating this 100 times
2023-10-12 13:52:05 +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
Chris Tsang
97ee0a9703
Test derive FromJsonQueryResult
2023-07-26 20:17:55 +01:00
Chris Tsang
a5f2ae69e9
Organize entity prelude
2023-07-13 16:53:24 +01: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
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
d35cd6aa3b
Test suit load environment variable from env files ( #1701 )
2023-06-12 17:19:30 +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
44a94d65d2
Bump SeaQuery and SeaSchema to new latest RC version ( #1661 )
2023-05-18 16:51:13 +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
f646aa7a70
chore: re-export sea_query::BlobSize
in sea_orm::entity::prelude
( #1548 )
2023-03-20 18:52:26 +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
08a5e87e22
Replace SeaORM's ColumnType
( #1395 )
...
* Replace SeaORM's `ColumnType`
* Bump SeaQuery's version
* Fix merge conflict
* refactor
2023-01-29 11:06:01 +08:00
Billy Chan
71dbffc725
Fix clippy ( #1426 )
...
* Fix clippy
* Fix clippy
2023-01-27 18:50:20 +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
Chris Tsang
4210526ec1
Merge pull request #1311 from SeaQL/select-into-tuple
...
Select into tuple
2023-01-10 15:20:14 +08:00
Chris Tsang
5c93253877
Tests
2023-01-09 14:46:19 +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
1135c117c3
fixup
2022-12-20 15:56:42 +08:00
Billy Chan
2f00a8757d
Merge branch 'master' into select-into-tuple
2022-12-20 15:51:06 +08:00
Billy Chan
d205338f3f
Try custom vector field ( #1273 )
2022-12-19 17:08:32 +08:00
Billy Chan
70c4a3a23e
Select into tuple
2022-12-15 21:24:10 +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
1be6673f0e
Fix DeriveActiveEnum expand enum variant starts with number ( #1219 )
2022-11-15 10:56:25 +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
29da37b4f2
Merge branch 'master' into sea-query-v0.27
2022-10-17 17:53:41 +08:00
Billy Chan
671d79469a
Fixup
2022-10-17 17:25:35 +08:00
wdcocq
880147c596
Blanket IntoActiveValue implementations so custom db types are supported ( #833 )
...
* Add blanket implementations of IntoActiveValue for optional values
* Add a compile test for DeriveIntoActiveModel
2022-10-11 23:47:17 +08:00
Billy Chan
77bddd85a5
Fixup
2022-09-22 15:07:37 +08:00
Billy Chan
43495de0aa
Fix clippy warnings - 1 ( #967 )
...
* Fix clippy warnings
* cargo fmt
* Fix clippy warnings
* cargo fmt
2022-08-12 20:02:53 +08:00
Billy Chan
d6831e5295
Bump version of sqlx, sea-query, sea-schema, time and uuid ( #834 )
...
* Bump version of sqlx, sea-query, sea-schema, time and uuid
* PostgreSQL `u32` was wrapped in `Oid` (launchbadge/sqlx#1602 )
* Update test cases
* Fix clippy warnings
* cargo fmt
* Fix clippy warnings
* Bump sea-schema to ^0.9.2
* Update test cases
* Pin on sea-query minor version
2022-07-05 01:05:11 +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