-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix int
marshal, unmarshall
#290
Conversation
164fbb1
to
04a8b1f
Compare
04a8b1f
to
f5786f6
Compare
marshal.go
Outdated
@@ -20,6 +20,7 @@ import ( | |||
|
|||
"gopkg.in/inf.v0" | |||
|
|||
cqlint "github.com/gocql/gocql/marshal/int" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this cqlint needed, can you just use int
similarly to smallint
and tinyint
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because identifier int
already busy
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so maybe rename the package to cqlint to not have this thing here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dkropachev what do you think? cqlint "github.com/gocql/gocql/marshal/int"
is better or "github.com/gocql/gocql/marshal/cqlint"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
f5786f6
to
96d13c3
Compare
96d13c3
to
6a31ac6
Compare
Fixed for
int
type:string
marshal and unmarshal asnullable
.1.1. Before: marshals
""
- caused an error; unmarshalsnil data
into"0"
.1.2. Now: marshals and unmarshals
nil data
-""
.custom string
marshals and unmarshals, beforenot supported
, nowsupported
.big.Int
marshals, beforenot supported
, nowsupported
.math.MaxUint32
, intouint32
,uint64
,uint
, returnerror' before, now
no error`.data
with the length is different from0
and4
, did not returnerror
before, now it returns `error'.Close issues for
int
:cql types
unmarshaling data that have bigger len thancql type
, do not return an error. #246cql types
ago string
is supported, but not ago custom string
#243cql types
:tinyint
,smallint
,int
can not be marshaled intogo big.Int
#244zero
andnull
data and values. #250cql types
unmarshaling data that have smaller len thancql type
, do not return an error. #252