Commit Graph

20 Commits

Author SHA1 Message Date
Flori f0dbd3410f
sqlx_bitflag_derive: Use PgU64 as translation base (#552)
* sqlx_bitflag_derive: Use PgU64 as translation base

* Bump version of chorus-macros
2024-08-25 21:51:12 +02:00
Flori 86b022912f
Initial support for PostgreSQL (#548)
* Change sqlx::Any to sqlx::Postgres

* Change sqlx::Any to sqlx::Postgres

* Remove JSONified overrides when sqlx feature is enabled, where it makes sense

* Add num-bigint dep

* Remove generic impl for From<T> for Snowflake
For some reason, this trait bound conflicts with another trait bound from the sqlx-pg-uint crate, even though I personally don't get why.

* Remove num_bigint, adsd sqlx-pg-uint

* swap u64 for PgU64 in some files

* use v0.3.0 of sqlx-pg-uint

* Lots of sqlx-postgres type changes

* Lots of sqlx-postgres type changes

* gwah

* Change repr(i8) to repr(i16) in enums when sqlx feature is enabled, fix sqlx incompatibilities

* impl sqlx::postgres::PgHasArrayType for Snowflake

* Try: derive Type for FriendSourceFlags, GuildFolder

* Try: Derive FromRow, Type for DefaultReaction

* Try: Derive Type for CustomStatus

* Try: Derive Type, FromRow for Tag

* Replace conditional compiling of uNN/PgUNN with conditional compiled type alias

* Fix: Conditional compiling errors and warnings

* Bump: wasm-bindgen* crate versions
2024-08-21 23:43:42 +02:00
Flori e4dd31ef78
sqlx related improvements (#542)
* Bump sqlx to 0.8.0

* Update sqlx syntax to 0.8.0, change MySql for sqlx:: Any

* Update sqlx syntax to 0.8.0, change MySql for sqlx:: Any

* Modify chorus_macros::SqlxBitflagDerive to use sqlx::Any over sqlx::MySql (broken!)

* Fix: `cannot infer type for type parameter `DB` declared on the trait...`

* Change remaining impls of sqlx traits for MySql to sqlx::Any

* Alter chorus_macros to correctly derive SqlxBitFlag for sqlx::Any

* rustc/clippy>=v1.80.0: Do not warn when encountering cfg(tarpaulin_include)

* Port compare_* methods to sqlx v0.8.0
2024-08-04 13:08:56 +02:00
kozabrada123 743f106ec6
Miscellaneous fixes (#514)
- fix `PATCH /users/@me` - It incorrectly returned a required password error, even if the current password was set
- fix `GET /users/@me/guilds` - It incorrectly sent body parameters instead of query ones
- don't log debug! for every successful ratelimited request - use trace! so it's less spamy
- update the max expected compression ratio (several times) from 20 to 200. let's hope that will be enough
- fix deserialization errors relating to guild folders in user settings
- fix a panic in `SqlxBitFlags` if there are extra flags. It now truncates them
- update `chorus_macros` to 0.4.1 (due to the above fix)
- log (trace!) event data if we fail to parse it or it's unrecognised, for debugging purposes
- fix a deserialization error in the `MessageACK` event
- fix `public_flags` in user objects not being `PublicFlags` bitflags
2024-06-28 14:05:59 +02:00
Quat3rnion e553d10f25 Add new SerdeBitFlags derive macro, to help reduce repetitive code 2024-06-18 10:04:00 -04:00
Quat3rnion 9bd55b9b5f Fix error in macro 2024-06-07 14:08:24 -04:00
Quat3rnion 656e5e31c0 Add SqlxBitFlags derive macro 2024-06-07 13:03:44 -04:00
kozabrada123 c7af410b2b add WebSocketEvent macro derive, bump chorus-macros to 0.3.0 (#490)
* feat: add WebSocketEvent derive, bump to 0.2.1

* change license, version of macros
2024-04-19 17:13:36 +02:00
bitfl0wer b8ba92cf07 Include license header everywhere 2024-01-30 17:19:34 +01:00
bitfl0wer 7938f0295e Add source url field trait 2023-09-03 21:00:48 +02:00
bitfl0wer 887ba4a1b1 Make trait Debug 2023-08-16 21:26:27 +02:00
bitfl0wer a9381fec1e Revert "Give `GatewayHandle` and `Gateway` common trait to call `watch_whole()` or observe() from a `Gateway`"
This reverts commit d36b1de170.
2023-08-16 00:21:18 +02:00
bitfl0wer d36b1de170 Give `GatewayHandle` and `Gateway` common trait to call `watch_whole()` or observe() from a `Gateway` 2023-08-16 00:18:32 +02:00
bitfl0wer b1594cf1e1 Merge branch 'feature/update-message-all-events' into enhancement/improved-auto-updating-structs 2023-08-15 20:53:56 +02:00
bitfl0wer 32fd918a43 Remove `Send` bound 2023-08-15 20:18:11 +02:00
bitfl0wer 5ac680b64d Remove superfluous nesting 2023-08-15 17:08:27 +02:00
bitfl0wer 28ea95f4a4 Use async trait where needed 2023-08-15 16:57:35 +02:00
bitfl0wer 623c070671 Add macro and attributes for automatic watching of Composite structs and their components 2023-08-15 12:13:49 +02:00
bitfl0wer 6bed0badc8 Add JsonField derive 2023-08-04 16:41:37 +02:00
SpecificProtagonist 9ebe72a7dc derive Updateable (#167) 2023-07-22 11:20:31 +02:00