From 8cfd6cfa5f89f2d70b94e004ed72c0bbd1485552 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Garcia?= Date: Sun, 4 Dec 2022 17:48:27 -0300 Subject: [PATCH] Updated Modifiers (markdown) --- Modifiers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modifiers.md b/Modifiers.md index 85749bf..c6c3db3 100644 --- a/Modifiers.md +++ b/Modifiers.md @@ -26,7 +26,7 @@ Modifiers improve on the `Valuer`/`Scanner` feature provided by the standard lib - `json`: It will convert any type to JSON before writing to the database and unmarshal it back from JSON when reading, this makes it easy to save structs as JSON in the database if this fits your use-case. -- `timeNowUTC`: It only works if on attributes of type `time.Time` and it sets this attribute to `time.Now().UTC()` every time before insertions and updates. This modifier was created to be used on `UpdatedAt` timestamp fields. +- `timeNowUTC`: It only work on attributes of type `time.Time` and it sets this attribute to `time.Now().UTC()` every time before insertions and updates. This modifier was created to be used on `UpdatedAt` timestamp fields. - `timeNowUTC/skipUpdates`: Does the same as the above but only on insertions, during Updates attributes marked with this modifier will be completely ignored. This is useful for `CreatedAt` fields where you only want them to be set once when first creating the record. - `skipUpdates`: Will ignore fields on updates. - `skipInserts`: Will ignore fields on inserts.