gotosocial/internal/gtsmodel
kim 4c4a622088
Prune unnecessary nullzeros, fixup db tags (#200)
* prune gtsmodel.Account bun tags, add note to gtsmodel dir

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* further database tag fixes

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* more db tag fixups

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* fix removing nullzero for account timestamps...

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* add nullzero back to accountid tag

Signed-off-by: kim (grufwub) <grufwub@gmail.com>

* rename gtsmodel readme

Signed-off-by: kim (grufwub) <grufwub@gmail.com>
2021-09-10 10:08:21 +02:00
..
account.go Prune unnecessary nullzeros, fixup db tags (#200) 2021-09-10 10:08:21 +02:00
application.go Prune unnecessary nullzeros, fixup db tags (#200) 2021-09-10 10:08:21 +02:00
block.go Prune unnecessary nullzeros, fixup db tags (#200) 2021-09-10 10:08:21 +02:00
client.go client_test 2021-09-02 12:17:14 +02:00
domainblock.go Prune unnecessary nullzeros, fixup db tags (#200) 2021-09-10 10:08:21 +02:00
emaildomainblock.go moving stuff around 2021-09-01 18:29:25 +02:00
emoji.go Prune unnecessary nullzeros, fixup db tags (#200) 2021-09-10 10:08:21 +02:00
follow.go Prune unnecessary nullzeros, fixup db tags (#200) 2021-09-10 10:08:21 +02:00
followrequest.go Prune unnecessary nullzeros, fixup db tags (#200) 2021-09-10 10:08:21 +02:00
instance.go Prune unnecessary nullzeros, fixup db tags (#200) 2021-09-10 10:08:21 +02:00
mediaattachment.go Prune unnecessary nullzeros, fixup db tags (#200) 2021-09-10 10:08:21 +02:00
mention.go moving stuff around 2021-09-01 18:29:25 +02:00
notification.go moving stuff around 2021-09-01 18:29:25 +02:00
README.md Prune unnecessary nullzeros, fixup db tags (#200) 2021-09-10 10:08:21 +02:00
routersession.go moving stuff around 2021-09-01 18:29:25 +02:00
status.go Prune unnecessary nullzeros, fixup db tags (#200) 2021-09-10 10:08:21 +02:00
statusbookmark.go moving stuff around 2021-09-01 18:29:25 +02:00
statusfave.go moving stuff around 2021-09-01 18:29:25 +02:00
statusmute.go moving stuff around 2021-09-01 18:29:25 +02:00
tag.go moving stuff around 2021-09-01 18:29:25 +02:00
token.go Prune unnecessary nullzeros, fixup db tags (#200) 2021-09-10 10:08:21 +02:00
user.go handle oauth token scope, fix user.SigninCount + token.UserID 2021-09-08 20:46:08 +01:00

A note on when we should set data structures linked to objects in the database to use the bun nullzero tag -- this should only be done if the member type is a pointer, or if the this primitive type is literally invalid with an empty value (e.g. media IDs which when empty signifies a null database value, compared to say an account note which when empty could mean either an empty note OR null database value).

Obviously it is a little more complex than this in practice, but keep it in mind!