Skip to content

Commit

Permalink
Fixed docs inaccuracy: OptionalOrDefault => OptionalWithDefault (ydb-…
Browse files Browse the repository at this point in the history
  • Loading branch information
asmyasnikov authored Jul 23, 2024
1 parent 2970d07 commit 1091a58
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions ydb/docs/en/core/dev/example-app/go/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,13 @@ err = c.Do(ctx,
return err
}
for res.NextRow() {
// named.OptionalOrDefault enables you to "deploy" optional
// named.OptionalWithDefault enables you to "deploy" optional
// results or use the default type value in Go
err = res.ScanNamed(
named.Required("series_id", &seriesID),
named.OptionalOrDefault("season_id", &seasonID),
named.OptionalOrDefault("title", &title),
named.OptionalOrDefault("first_aired", &date),
named.OptionalWithDefault("season_id", &seasonID),
named.OptionalWithDefault("title", &title),
named.OptionalWithDefault("first_aired", &date),
)
if err != nil {
return err
Expand All @@ -247,4 +247,4 @@ err = c.Do(ctx,
if err != nil {
// handling a query execution error
}
```
```
8 changes: 4 additions & 4 deletions ydb/docs/ru/core/dev/example-app/go/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,13 @@ err = c.Do(ctx,
return err
}
for res.NextRow() {
// named.OptionalOrDefault позволяет "развернуть" опциональные
// named.OptionalWithDefault позволяет "развернуть" опциональные
// результаты или использовать дефолтное значение типа go
err = res.ScanNamed(
named.Required("series_id", &seriesID),
named.OptionalOrDefault("season_id", &seasonID),
named.OptionalOrDefault("title", &title),
named.OptionalOrDefault("first_aired", &date),
named.OptionalWithDefault("season_id", &seasonID),
named.OptionalWithDefault("title", &title),
named.OptionalWithDefault("first_aired", &date),
)
if err != nil {
return err
Expand Down

0 comments on commit 1091a58

Please sign in to comment.