We check for the presence of binary_parameters
in the DSN and add the 0x01 byte accordingly.
This helps us avoid casting to string
and efficiently use the database.
```release-note
NONE
```
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Ported GetMembersByIds and GetMembersByChannelIds to Squirrel
* Added checks for empty ID lists
* Updated GetAllChannelMembersById to use Squirrel
* Added a method to get the query placeholder directly
* Migrated UpdateMultipleMembers to use a Squirrel query
* Migrated UpdateMultipleMembers to Squirrel
* Initialize a prepared query builder for channelMembersForTeamWithSchemeSelectQuery
* Migrated GetMembersForUser to Squirrel
* Slight improvement for constructMySQLJSONArgs
* Migrated UpdateMemberNotifyProps to Squirrel
* Migrated GetMembers to Squirrel
* Migrated GetMember to Squirrel
* Avoid shadowing err
* Don't set query builder on copy of SqlChannelStore
* Fixed typo in error message
* Fixed missing elipsis
* Shorter SQL generation for GetAllChannelMembersById
* Don't unnecessarily copy the reference
* Use a function to generate the ChannelMember map
* Avoid shadowing err
* Don't use IN for matching multiple possible values
* Initialize the members lists
* Remove check for empty channelIDs list
* Fixed test and removed check for empty list
* Use err2 rather than eerr
Co-authored-by: Tim Scheuermann <tim@plusmid.dev>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
We create a custom io.Writer to pass to the logger
instance. For now, we keep everything to debug
as all errors are surfaced back to the server via
the API.
```release-note
NONE
```
* [MM-39232] Migrate from gorp to sqlx in store/sqlstore/reaction_store.go
* Fix failing mysql tests
* Fix failing postgres specs
* Use struct instead of params
* format using `goimports -local github.com/mattermost/mattermost-server/v5 -w`
* added goimports lint check to .golangci.yml
* format using `goimports -local github.com/mattermost/mattermost-server/v5 -w` for a corner case
* make app-layers, *-mocks and store-layers for ci check
Co-authored-by: Mahmudul Haque <mahmudulhaque@protonmail.com>
Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
* Consistent license message for all the go files
* Fixing the last set of unconsistencies with the license headers
* Addressing PR review comments
* Fixing busy.go and busy_test.go license header
* MM-11272 Added app.PreparePostForClient
* MM-11272 Added app.PreparePostListForClient
* MM-11272 Added EmojiStore.GetMultipleByName
* MM-11272 Added emojis to PreparePostForClient
* MM-11272 Added unit tests for getting reaction counts
* MM-11272 Added unit tests for TestPreparePostForClient
* MM-11272 Added emojis from reactions to Post.Emojis
* MM-11272 Always update post.UpdateAt when reactions change to bust cache
* Fixed merge conflicts
* Moved post metadata-related code into its own file
* Update store mocks
* Fixed typo
* Add missing license headers
* Updated post metadata tests when custom emojis are disabled
* Fix unreliable unit tests
* Fix inconsistent casing in SQL statements
* Fix blank line
* Invalidate store cache after making changes
* Clear post cache synchronously with reactions