Utkarsh Chourasia
12/03/2022, 11:38 AMmain.go
files in examples.Andrey Pechkurov
12/05/2022, 10:35 AMsender.
Table("trades").
Long256Column("value", 1, 2, 3, 4).
AtNow(ctx)
or accept a math/big Int: https://pkg.go.dev/math/big#Int
var v Int
v.SetUint64(42)
sender.
Table("trades").
Long256Column("value", v).
AtNow(ctx)
Utkarsh Chourasia
12/11/2022, 10:40 AMLong256Column()
.
Currently the tests are not passing for some reason,
Can you guide me on this a little?
https://github.com/JammUtkarsh/go-questdb-client/blob/add-long256/sender_test.go#L188Andrey Pechkurov
12/12/2022, 7:37 AM123i
is the format of 64-bit integer columns (long
type). Long256 columns use a different format:
https://questdb.io/docs/reference/api/ilp/columnset-types/#long256sender_integration_test.go
file.Utkarsh Chourasia
12/12/2022, 9:28 AMAndrey Pechkurov
12/12/2022, 10:04 AM<http://big.Int|big.Int>
sign (positive numbers only) and boundaries (a long256 is 256 bits). Tests should cover those.
As for <http://big.Int|big.Int>
values vs pointers, I'd better accept a pointer, not a struct in the Long256Column
method. That's because the docs mention that shallow copies of `big.Int`s are not supported and may lead to errors.
Finally, a nit: I'd better rename buffer.WriteLong
into buffer.WriteBitInt
and also accept a pointer there.