relops / cqlc

cqlc generates Go code from your Cassandra schema so that you can write type safe CQL statements in Go with a natural query syntax.
Other
102 stars 25 forks source link

Struct tags for json/cql marshalling/unmarshalling #30

Open bipin-nag opened 8 years ago

bipin-nag commented 8 years ago

First off thanks to all developers for making this library. It is really useful. I would request you to generate struct tags for easier json or gocql conversion/usage.

Before using cqlc I used my own structs like the following:

type user struct {
    Username string `json:"username" cql:"username"`
}

This would be very helpful for using mentioned libraries.

0x6e6562 commented 8 years ago

This sounds like a reasonable thing to want to do and it shouldn't make too much difference to the generated struct code. I'm not 100% on an ETA for this though.