From 31c9dabe079de971f83ab8227e5c84e8191fbd80 Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Mon, 9 Sep 2024 19:47:03 +1200 Subject: [PATCH] Add update attribute parameters --- CHANGELOG.md | 2 +- client/client.go | 4 +- databases/databases.go | 274 ++++++++++++++++-- .../databases/update-boolean-attribute.md | 1 + .../databases/update-datetime-attribute.md | 1 + .../databases/update-email-attribute.md | 1 + .../databases/update-enum-attribute.md | 1 + .../databases/update-float-attribute.md | 1 + .../databases/update-integer-attribute.md | 1 + .../examples/databases/update-ip-attribute.md | 1 + .../update-relationship-attribute.md | 1 + .../databases/update-string-attribute.md | 2 + .../databases/update-url-attribute.md | 1 + 13 files changed, 270 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c24fcaa..f1cdd79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ # # Change Log -## 0.1.0 +## 0.2.0 \ No newline at end of file diff --git a/client/client.go b/client/client.go index b4ed6e4..f4e352b 100644 --- a/client/client.go +++ b/client/client.go @@ -69,11 +69,11 @@ type Client struct { func New(optionalSetters ...ClientOption) Client { headers := map[string]string{ "X-Appwrite-Response-Format" : "1.6.0", - "user-agent" : fmt.Sprintf("AppwriteGoSDK/0.1.0 (%s; %s)", runtime.GOOS, runtime.GOARCH), + "user-agent" : fmt.Sprintf("AppwriteGoSDK/0.2.0 (%s; %s)", runtime.GOOS, runtime.GOARCH), "x-sdk-name": "Go", "x-sdk-platform": "server", "x-sdk-language": "go", - "x-sdk-version": "0.1.0", + "x-sdk-version": "0.2.0", } httpClient, err := GetDefaultClient(defaultTimeout) if err != nil { diff --git a/databases/databases.go b/databases/databases.go index 98ff735..ee1c440 100644 --- a/databases/databases.go +++ b/databases/databases.go @@ -724,18 +724,42 @@ func (srv *Databases) CreateBooleanAttribute(DatabaseId string, CollectionId str return &parsed, nil } - +type UpdateBooleanAttributeOptions struct { + NewKey string + enabledSetters map[string]bool +} +func (options UpdateBooleanAttributeOptions) New() *UpdateBooleanAttributeOptions { + options.enabledSetters = map[string]bool{ + "NewKey": false, + } + return &options +} +type UpdateBooleanAttributeOption func(*UpdateBooleanAttributeOptions) +func (srv *Databases) WithUpdateBooleanAttributeNewKey(v string) UpdateBooleanAttributeOption { + return func(o *UpdateBooleanAttributeOptions) { + o.NewKey = v + o.enabledSetters["NewKey"] = true + } +} + // UpdateBooleanAttribute update a boolean attribute. Changing the `default` // value will not update already existing documents. -func (srv *Databases) UpdateBooleanAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default bool)(*models.AttributeBoolean, error) { +func (srv *Databases) UpdateBooleanAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default bool, optionalSetters ...UpdateBooleanAttributeOption)(*models.AttributeBoolean, error) { r := strings.NewReplacer("{databaseId}", DatabaseId, "{collectionId}", CollectionId, "{key}", Key) path := r.Replace("/databases/{databaseId}/collections/{collectionId}/attributes/boolean/{key}") + options := UpdateBooleanAttributeOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } params := map[string]interface{}{} params["databaseId"] = DatabaseId params["collectionId"] = CollectionId params["key"] = Key params["required"] = Required params["default"] = Default + if options.enabledSetters["NewKey"] { + params["newKey"] = options.NewKey + } headers := map[string]interface{}{ "content-type": "application/json", } @@ -838,18 +862,42 @@ func (srv *Databases) CreateDatetimeAttribute(DatabaseId string, CollectionId st return &parsed, nil } - +type UpdateDatetimeAttributeOptions struct { + NewKey string + enabledSetters map[string]bool +} +func (options UpdateDatetimeAttributeOptions) New() *UpdateDatetimeAttributeOptions { + options.enabledSetters = map[string]bool{ + "NewKey": false, + } + return &options +} +type UpdateDatetimeAttributeOption func(*UpdateDatetimeAttributeOptions) +func (srv *Databases) WithUpdateDatetimeAttributeNewKey(v string) UpdateDatetimeAttributeOption { + return func(o *UpdateDatetimeAttributeOptions) { + o.NewKey = v + o.enabledSetters["NewKey"] = true + } +} + // UpdateDatetimeAttribute update a date time attribute. Changing the // `default` value will not update already existing documents. -func (srv *Databases) UpdateDatetimeAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string)(*models.AttributeDatetime, error) { +func (srv *Databases) UpdateDatetimeAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string, optionalSetters ...UpdateDatetimeAttributeOption)(*models.AttributeDatetime, error) { r := strings.NewReplacer("{databaseId}", DatabaseId, "{collectionId}", CollectionId, "{key}", Key) path := r.Replace("/databases/{databaseId}/collections/{collectionId}/attributes/datetime/{key}") + options := UpdateDatetimeAttributeOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } params := map[string]interface{}{} params["databaseId"] = DatabaseId params["collectionId"] = CollectionId params["key"] = Key params["required"] = Required params["default"] = Default + if options.enabledSetters["NewKey"] { + params["newKey"] = options.NewKey + } headers := map[string]interface{}{ "content-type": "application/json", } @@ -951,18 +999,42 @@ func (srv *Databases) CreateEmailAttribute(DatabaseId string, CollectionId strin return &parsed, nil } - +type UpdateEmailAttributeOptions struct { + NewKey string + enabledSetters map[string]bool +} +func (options UpdateEmailAttributeOptions) New() *UpdateEmailAttributeOptions { + options.enabledSetters = map[string]bool{ + "NewKey": false, + } + return &options +} +type UpdateEmailAttributeOption func(*UpdateEmailAttributeOptions) +func (srv *Databases) WithUpdateEmailAttributeNewKey(v string) UpdateEmailAttributeOption { + return func(o *UpdateEmailAttributeOptions) { + o.NewKey = v + o.enabledSetters["NewKey"] = true + } +} + // UpdateEmailAttribute update an email attribute. Changing the `default` // value will not update already existing documents. -func (srv *Databases) UpdateEmailAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string)(*models.AttributeEmail, error) { +func (srv *Databases) UpdateEmailAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string, optionalSetters ...UpdateEmailAttributeOption)(*models.AttributeEmail, error) { r := strings.NewReplacer("{databaseId}", DatabaseId, "{collectionId}", CollectionId, "{key}", Key) path := r.Replace("/databases/{databaseId}/collections/{collectionId}/attributes/email/{key}") + options := UpdateEmailAttributeOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } params := map[string]interface{}{} params["databaseId"] = DatabaseId params["collectionId"] = CollectionId params["key"] = Key params["required"] = Required params["default"] = Default + if options.enabledSetters["NewKey"] { + params["newKey"] = options.NewKey + } headers := map[string]interface{}{ "content-type": "application/json", } @@ -1066,12 +1138,33 @@ func (srv *Databases) CreateEnumAttribute(DatabaseId string, CollectionId string return &parsed, nil } - +type UpdateEnumAttributeOptions struct { + NewKey string + enabledSetters map[string]bool +} +func (options UpdateEnumAttributeOptions) New() *UpdateEnumAttributeOptions { + options.enabledSetters = map[string]bool{ + "NewKey": false, + } + return &options +} +type UpdateEnumAttributeOption func(*UpdateEnumAttributeOptions) +func (srv *Databases) WithUpdateEnumAttributeNewKey(v string) UpdateEnumAttributeOption { + return func(o *UpdateEnumAttributeOptions) { + o.NewKey = v + o.enabledSetters["NewKey"] = true + } +} + // UpdateEnumAttribute update an enum attribute. Changing the `default` value // will not update already existing documents. -func (srv *Databases) UpdateEnumAttribute(DatabaseId string, CollectionId string, Key string, Elements []string, Required bool, Default string)(*models.AttributeEnum, error) { +func (srv *Databases) UpdateEnumAttribute(DatabaseId string, CollectionId string, Key string, Elements []string, Required bool, Default string, optionalSetters ...UpdateEnumAttributeOption)(*models.AttributeEnum, error) { r := strings.NewReplacer("{databaseId}", DatabaseId, "{collectionId}", CollectionId, "{key}", Key) path := r.Replace("/databases/{databaseId}/collections/{collectionId}/attributes/enum/{key}") + options := UpdateEnumAttributeOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } params := map[string]interface{}{} params["databaseId"] = DatabaseId params["collectionId"] = CollectionId @@ -1079,6 +1172,9 @@ func (srv *Databases) UpdateEnumAttribute(DatabaseId string, CollectionId string params["elements"] = Elements params["required"] = Required params["default"] = Default + if options.enabledSetters["NewKey"] { + params["newKey"] = options.NewKey + } headers := map[string]interface{}{ "content-type": "application/json", } @@ -1203,12 +1299,33 @@ func (srv *Databases) CreateFloatAttribute(DatabaseId string, CollectionId strin return &parsed, nil } - +type UpdateFloatAttributeOptions struct { + NewKey string + enabledSetters map[string]bool +} +func (options UpdateFloatAttributeOptions) New() *UpdateFloatAttributeOptions { + options.enabledSetters = map[string]bool{ + "NewKey": false, + } + return &options +} +type UpdateFloatAttributeOption func(*UpdateFloatAttributeOptions) +func (srv *Databases) WithUpdateFloatAttributeNewKey(v string) UpdateFloatAttributeOption { + return func(o *UpdateFloatAttributeOptions) { + o.NewKey = v + o.enabledSetters["NewKey"] = true + } +} + // UpdateFloatAttribute update a float attribute. Changing the `default` value // will not update already existing documents. -func (srv *Databases) UpdateFloatAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Min float64, Max float64, Default float64)(*models.AttributeFloat, error) { +func (srv *Databases) UpdateFloatAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Min float64, Max float64, Default float64, optionalSetters ...UpdateFloatAttributeOption)(*models.AttributeFloat, error) { r := strings.NewReplacer("{databaseId}", DatabaseId, "{collectionId}", CollectionId, "{key}", Key) path := r.Replace("/databases/{databaseId}/collections/{collectionId}/attributes/float/{key}") + options := UpdateFloatAttributeOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } params := map[string]interface{}{} params["databaseId"] = DatabaseId params["collectionId"] = CollectionId @@ -1217,6 +1334,9 @@ func (srv *Databases) UpdateFloatAttribute(DatabaseId string, CollectionId strin params["min"] = Min params["max"] = Max params["default"] = Default + if options.enabledSetters["NewKey"] { + params["newKey"] = options.NewKey + } headers := map[string]interface{}{ "content-type": "application/json", } @@ -1341,12 +1461,33 @@ func (srv *Databases) CreateIntegerAttribute(DatabaseId string, CollectionId str return &parsed, nil } - +type UpdateIntegerAttributeOptions struct { + NewKey string + enabledSetters map[string]bool +} +func (options UpdateIntegerAttributeOptions) New() *UpdateIntegerAttributeOptions { + options.enabledSetters = map[string]bool{ + "NewKey": false, + } + return &options +} +type UpdateIntegerAttributeOption func(*UpdateIntegerAttributeOptions) +func (srv *Databases) WithUpdateIntegerAttributeNewKey(v string) UpdateIntegerAttributeOption { + return func(o *UpdateIntegerAttributeOptions) { + o.NewKey = v + o.enabledSetters["NewKey"] = true + } +} + // UpdateIntegerAttribute update an integer attribute. Changing the `default` // value will not update already existing documents. -func (srv *Databases) UpdateIntegerAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Min int, Max int, Default int)(*models.AttributeInteger, error) { +func (srv *Databases) UpdateIntegerAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Min int, Max int, Default int, optionalSetters ...UpdateIntegerAttributeOption)(*models.AttributeInteger, error) { r := strings.NewReplacer("{databaseId}", DatabaseId, "{collectionId}", CollectionId, "{key}", Key) path := r.Replace("/databases/{databaseId}/collections/{collectionId}/attributes/integer/{key}") + options := UpdateIntegerAttributeOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } params := map[string]interface{}{} params["databaseId"] = DatabaseId params["collectionId"] = CollectionId @@ -1355,6 +1496,9 @@ func (srv *Databases) UpdateIntegerAttribute(DatabaseId string, CollectionId str params["min"] = Min params["max"] = Max params["default"] = Default + if options.enabledSetters["NewKey"] { + params["newKey"] = options.NewKey + } headers := map[string]interface{}{ "content-type": "application/json", } @@ -1456,18 +1600,42 @@ func (srv *Databases) CreateIpAttribute(DatabaseId string, CollectionId string, return &parsed, nil } - +type UpdateIpAttributeOptions struct { + NewKey string + enabledSetters map[string]bool +} +func (options UpdateIpAttributeOptions) New() *UpdateIpAttributeOptions { + options.enabledSetters = map[string]bool{ + "NewKey": false, + } + return &options +} +type UpdateIpAttributeOption func(*UpdateIpAttributeOptions) +func (srv *Databases) WithUpdateIpAttributeNewKey(v string) UpdateIpAttributeOption { + return func(o *UpdateIpAttributeOptions) { + o.NewKey = v + o.enabledSetters["NewKey"] = true + } +} + // UpdateIpAttribute update an ip attribute. Changing the `default` value will // not update already existing documents. -func (srv *Databases) UpdateIpAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string)(*models.AttributeIp, error) { +func (srv *Databases) UpdateIpAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string, optionalSetters ...UpdateIpAttributeOption)(*models.AttributeIp, error) { r := strings.NewReplacer("{databaseId}", DatabaseId, "{collectionId}", CollectionId, "{key}", Key) path := r.Replace("/databases/{databaseId}/collections/{collectionId}/attributes/ip/{key}") + options := UpdateIpAttributeOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } params := map[string]interface{}{} params["databaseId"] = DatabaseId params["collectionId"] = CollectionId params["key"] = Key params["required"] = Required params["default"] = Default + if options.enabledSetters["NewKey"] { + params["newKey"] = options.NewKey + } headers := map[string]interface{}{ "content-type": "application/json", } @@ -1678,18 +1846,53 @@ func (srv *Databases) CreateStringAttribute(DatabaseId string, CollectionId stri return &parsed, nil } - +type UpdateStringAttributeOptions struct { + Size int + NewKey string + enabledSetters map[string]bool +} +func (options UpdateStringAttributeOptions) New() *UpdateStringAttributeOptions { + options.enabledSetters = map[string]bool{ + "Size": false, + "NewKey": false, + } + return &options +} +type UpdateStringAttributeOption func(*UpdateStringAttributeOptions) +func (srv *Databases) WithUpdateStringAttributeSize(v int) UpdateStringAttributeOption { + return func(o *UpdateStringAttributeOptions) { + o.Size = v + o.enabledSetters["Size"] = true + } +} +func (srv *Databases) WithUpdateStringAttributeNewKey(v string) UpdateStringAttributeOption { + return func(o *UpdateStringAttributeOptions) { + o.NewKey = v + o.enabledSetters["NewKey"] = true + } +} + // UpdateStringAttribute update a string attribute. Changing the `default` // value will not update already existing documents. -func (srv *Databases) UpdateStringAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string)(*models.AttributeString, error) { +func (srv *Databases) UpdateStringAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string, optionalSetters ...UpdateStringAttributeOption)(*models.AttributeString, error) { r := strings.NewReplacer("{databaseId}", DatabaseId, "{collectionId}", CollectionId, "{key}", Key) path := r.Replace("/databases/{databaseId}/collections/{collectionId}/attributes/string/{key}") + options := UpdateStringAttributeOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } params := map[string]interface{}{} params["databaseId"] = DatabaseId params["collectionId"] = CollectionId params["key"] = Key params["required"] = Required params["default"] = Default + if options.enabledSetters["Size"] { + params["size"] = options.Size + } + if options.enabledSetters["NewKey"] { + params["newKey"] = options.NewKey + } headers := map[string]interface{}{ "content-type": "application/json", } @@ -1791,18 +1994,42 @@ func (srv *Databases) CreateUrlAttribute(DatabaseId string, CollectionId string, return &parsed, nil } - +type UpdateUrlAttributeOptions struct { + NewKey string + enabledSetters map[string]bool +} +func (options UpdateUrlAttributeOptions) New() *UpdateUrlAttributeOptions { + options.enabledSetters = map[string]bool{ + "NewKey": false, + } + return &options +} +type UpdateUrlAttributeOption func(*UpdateUrlAttributeOptions) +func (srv *Databases) WithUpdateUrlAttributeNewKey(v string) UpdateUrlAttributeOption { + return func(o *UpdateUrlAttributeOptions) { + o.NewKey = v + o.enabledSetters["NewKey"] = true + } +} + // UpdateUrlAttribute update an url attribute. Changing the `default` value // will not update already existing documents. -func (srv *Databases) UpdateUrlAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string)(*models.AttributeUrl, error) { +func (srv *Databases) UpdateUrlAttribute(DatabaseId string, CollectionId string, Key string, Required bool, Default string, optionalSetters ...UpdateUrlAttributeOption)(*models.AttributeUrl, error) { r := strings.NewReplacer("{databaseId}", DatabaseId, "{collectionId}", CollectionId, "{key}", Key) path := r.Replace("/databases/{databaseId}/collections/{collectionId}/attributes/url/{key}") + options := UpdateUrlAttributeOptions{}.New() + for _, opt := range optionalSetters { + opt(options) + } params := map[string]interface{}{} params["databaseId"] = DatabaseId params["collectionId"] = CollectionId params["key"] = Key params["required"] = Required params["default"] = Default + if options.enabledSetters["NewKey"] { + params["newKey"] = options.NewKey + } headers := map[string]interface{}{ "content-type": "application/json", } @@ -1905,11 +2132,13 @@ func (srv *Databases) DeleteAttribute(DatabaseId string, CollectionId string, Ke } type UpdateRelationshipAttributeOptions struct { OnDelete string + NewKey string enabledSetters map[string]bool } func (options UpdateRelationshipAttributeOptions) New() *UpdateRelationshipAttributeOptions { options.enabledSetters = map[string]bool{ "OnDelete": false, + "NewKey": false, } return &options } @@ -1920,6 +2149,12 @@ func (srv *Databases) WithUpdateRelationshipAttributeOnDelete(v string) UpdateRe o.enabledSetters["OnDelete"] = true } } +func (srv *Databases) WithUpdateRelationshipAttributeNewKey(v string) UpdateRelationshipAttributeOption { + return func(o *UpdateRelationshipAttributeOptions) { + o.NewKey = v + o.enabledSetters["NewKey"] = true + } +} // UpdateRelationshipAttribute update relationship attribute. [Learn more // about relationship @@ -1938,6 +2173,9 @@ func (srv *Databases) UpdateRelationshipAttribute(DatabaseId string, CollectionI if options.enabledSetters["OnDelete"] { params["onDelete"] = options.OnDelete } + if options.enabledSetters["NewKey"] { + params["newKey"] = options.NewKey + } headers := map[string]interface{}{ "content-type": "application/json", } diff --git a/docs/examples/databases/update-boolean-attribute.md b/docs/examples/databases/update-boolean-attribute.md index 0140344..b5386f0 100644 --- a/docs/examples/databases/update-boolean-attribute.md +++ b/docs/examples/databases/update-boolean-attribute.md @@ -20,6 +20,7 @@ func main() { "", false, false, + databases.WithUpdateBooleanAttributeNewKey(""), ) if error != nil { diff --git a/docs/examples/databases/update-datetime-attribute.md b/docs/examples/databases/update-datetime-attribute.md index 15707af..53a66e8 100644 --- a/docs/examples/databases/update-datetime-attribute.md +++ b/docs/examples/databases/update-datetime-attribute.md @@ -20,6 +20,7 @@ func main() { "", false, "", + databases.WithUpdateDatetimeAttributeNewKey(""), ) if error != nil { diff --git a/docs/examples/databases/update-email-attribute.md b/docs/examples/databases/update-email-attribute.md index 1efba58..0dd72be 100644 --- a/docs/examples/databases/update-email-attribute.md +++ b/docs/examples/databases/update-email-attribute.md @@ -20,6 +20,7 @@ func main() { "", false, "email@example.com", + databases.WithUpdateEmailAttributeNewKey(""), ) if error != nil { diff --git a/docs/examples/databases/update-enum-attribute.md b/docs/examples/databases/update-enum-attribute.md index fb4a58e..aec5177 100644 --- a/docs/examples/databases/update-enum-attribute.md +++ b/docs/examples/databases/update-enum-attribute.md @@ -21,6 +21,7 @@ func main() { []interface{}{}, false, "", + databases.WithUpdateEnumAttributeNewKey(""), ) if error != nil { diff --git a/docs/examples/databases/update-float-attribute.md b/docs/examples/databases/update-float-attribute.md index 1f77093..f7b40a2 100644 --- a/docs/examples/databases/update-float-attribute.md +++ b/docs/examples/databases/update-float-attribute.md @@ -22,6 +22,7 @@ func main() { 0, 0, 0, + databases.WithUpdateFloatAttributeNewKey(""), ) if error != nil { diff --git a/docs/examples/databases/update-integer-attribute.md b/docs/examples/databases/update-integer-attribute.md index b972aaa..705d92c 100644 --- a/docs/examples/databases/update-integer-attribute.md +++ b/docs/examples/databases/update-integer-attribute.md @@ -22,6 +22,7 @@ func main() { 0, 0, 0, + databases.WithUpdateIntegerAttributeNewKey(""), ) if error != nil { diff --git a/docs/examples/databases/update-ip-attribute.md b/docs/examples/databases/update-ip-attribute.md index ff28148..b47672c 100644 --- a/docs/examples/databases/update-ip-attribute.md +++ b/docs/examples/databases/update-ip-attribute.md @@ -20,6 +20,7 @@ func main() { "", false, "", + databases.WithUpdateIpAttributeNewKey(""), ) if error != nil { diff --git a/docs/examples/databases/update-relationship-attribute.md b/docs/examples/databases/update-relationship-attribute.md index 22d5f16..7deadc7 100644 --- a/docs/examples/databases/update-relationship-attribute.md +++ b/docs/examples/databases/update-relationship-attribute.md @@ -19,6 +19,7 @@ func main() { "", "", databases.WithUpdateRelationshipAttributeOnDelete("cascade"), + databases.WithUpdateRelationshipAttributeNewKey(""), ) if error != nil { diff --git a/docs/examples/databases/update-string-attribute.md b/docs/examples/databases/update-string-attribute.md index fd95d68..d662060 100644 --- a/docs/examples/databases/update-string-attribute.md +++ b/docs/examples/databases/update-string-attribute.md @@ -20,6 +20,8 @@ func main() { "", false, "", + databases.WithUpdateStringAttributeSize(0), + databases.WithUpdateStringAttributeNewKey(""), ) if error != nil { diff --git a/docs/examples/databases/update-url-attribute.md b/docs/examples/databases/update-url-attribute.md index eaee9ec..98dc66f 100644 --- a/docs/examples/databases/update-url-attribute.md +++ b/docs/examples/databases/update-url-attribute.md @@ -20,6 +20,7 @@ func main() { "", false, "https://example.com", + databases.WithUpdateUrlAttributeNewKey(""), ) if error != nil {