File tree 2 files changed +9
-9
lines changed
en/core/dev/example-app/go
ru/core/dev/example-app/go
2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -227,13 +227,13 @@ err = c.Do(ctx,
227
227
return err
228
228
}
229
229
for res.NextRow () {
230
- // named.OptionalOrDefault enables you to "deploy" optional
230
+ // named.OptionalWithDefault enables you to "deploy" optional
231
231
// results or use the default type value in Go
232
232
err = res.ScanNamed (
233
233
named.Required (" series_id" , &seriesID),
234
- named.OptionalOrDefault (" season_id" , &seasonID),
235
- named.OptionalOrDefault (" title" , &title),
236
- named.OptionalOrDefault (" first_aired" , &date),
234
+ named.OptionalWithDefault (" season_id" , &seasonID),
235
+ named.OptionalWithDefault (" title" , &title),
236
+ named.OptionalWithDefault (" first_aired" , &date),
237
237
)
238
238
if err != nil {
239
239
return err
@@ -247,4 +247,4 @@ err = c.Do(ctx,
247
247
if err != nil {
248
248
// handling a query execution error
249
249
}
250
- ```
250
+ ```
Original file line number Diff line number Diff line change @@ -227,13 +227,13 @@ err = c.Do(ctx,
227
227
return err
228
228
}
229
229
for res.NextRow () {
230
- // named.OptionalOrDefault позволяет "развернуть" опциональные
230
+ // named.OptionalWithDefault позволяет "развернуть" опциональные
231
231
// результаты или использовать дефолтное значение типа go
232
232
err = res.ScanNamed (
233
233
named.Required (" series_id" , &seriesID),
234
- named.OptionalOrDefault (" season_id" , &seasonID),
235
- named.OptionalOrDefault (" title" , &title),
236
- named.OptionalOrDefault (" first_aired" , &date),
234
+ named.OptionalWithDefault (" season_id" , &seasonID),
235
+ named.OptionalWithDefault (" title" , &title),
236
+ named.OptionalWithDefault (" first_aired" , &date),
237
237
)
238
238
if err != nil {
239
239
return err
You can’t perform that action at this time.
0 commit comments