Skip to content

Commit 3b44afe

Browse files
committed
fix style
1 parent 71fc6e9 commit 3b44afe

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

internal/params/builder_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ func TestBuilder(t *testing.T) {
462462
Type: &Ydb.Type{
463463
Type: &Ydb.Type_PgType{
464464
PgType: &Ydb.PgType{
465-
Oid: pg.UnknownOID,
465+
Oid: pg.OIDUnknown,
466466
},
467467
},
468468
},
@@ -483,7 +483,7 @@ func TestBuilder(t *testing.T) {
483483
Type: &Ydb.Type{
484484
Type: &Ydb.Type_PgType{
485485
PgType: &Ydb.PgType{
486-
Oid: pg.Int4OID,
486+
Oid: pg.OIDInt4,
487487
},
488488
},
489489
},
@@ -504,7 +504,7 @@ func TestBuilder(t *testing.T) {
504504
Type: &Ydb.Type{
505505
Type: &Ydb.Type_PgType{
506506
PgType: &Ydb.PgType{
507-
Oid: pg.Int8OID,
507+
Oid: pg.OIDInt8,
508508
},
509509
},
510510
},

internal/params/pg.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ type pgParam struct {
1212
}
1313

1414
func (p pgParam) Unknown(val string) Builder {
15-
return p.Value(pg.UnknownOID, val)
15+
return p.Value(pg.OIDUnknown, val)
1616
}
1717

1818
func (p pgParam) Value(oid uint32, val string) Builder {
@@ -23,9 +23,9 @@ func (p pgParam) Value(oid uint32, val string) Builder {
2323
}
2424

2525
func (p pgParam) Int4(val int32) Builder {
26-
return p.Value(pg.Int4OID, strconv.FormatInt(int64(val), 10))
26+
return p.Value(pg.OIDInt4, strconv.FormatInt(int64(val), 10))
2727
}
2828

2929
func (p pgParam) Int8(val int64) Builder {
30-
return p.Value(pg.Int8OID, strconv.FormatInt(val, 10))
30+
return p.Value(pg.OIDInt8, strconv.FormatInt(val, 10))
3131
}

internal/pg/pgconst.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package pg
33
const (
44
// https://github.com/postgres/postgres/blob/master/src/include/catalog/pg_type.dat
55

6-
Int4OID = 23
7-
Int8OID = 20
8-
UnknownOID = 705
6+
OIDInt4 = 23
7+
OIDInt8 = 20
8+
OIDUnknown = 705
99
)

internal/types/types_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ func TestTypeToString(t *testing.T) {
270270
s: "Variant<Bool,Float>",
271271
},
272272
{
273-
t: PgType{OID: pg.UnknownOID},
273+
t: PgType{OID: pg.OIDUnknown},
274274
s: "pgunknown",
275275
},
276276
} {

internal/value/value_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func TestToYDBFromYDB(t *testing.T) {
177177
ZeroValue(types.Text),
178178
ZeroValue(types.NewStruct()),
179179
ZeroValue(types.NewTuple()),
180-
PgValue(pg.Int4OID, "123"),
180+
PgValue(pg.OIDInt4, "123"),
181181
} {
182182
t.Run(strconv.Itoa(i)+"."+v.Yql(), func(t *testing.T) {
183183
a := allocator.New()
@@ -501,7 +501,7 @@ func TestValueYql(t *testing.T) {
501501
literal: `Yson("<a=1>[3;%false]")`,
502502
},
503503
{
504-
value: PgValue(pg.UnknownOID, "123"),
504+
value: PgValue(pg.OIDUnknown, "123"),
505505
literal: `PgUnknown("123")`,
506506
},
507507
} {

0 commit comments

Comments
 (0)