Hi!
I am trying to write a cb driver to a go library and have the following document in cb:
{
"subject_id": "493",
"subject_type": "User",
"predicate": "Post",
"object_id": "ctzbdgoU9h",
"nano_ts": 1443728525107964700,
"source": "493"
}
so nano_ts has a int64 type and there is also another document which has a []byte type field. Now i want to get that document based on a field but i am not able to serialize it back. My other ideas is to use META(bucket) and get the documetID instead and then Bulk/Multiget everything but i am not able to serialize that id neither with a simple struct and launch a query with select META().
type Idrow struct {
Id string `json:"id"`
}
Current code:
query := couchbase.NewN1qlQuery("SELECT subject_id,predicate,object_id,nano_ts,source FROM activity as b WHERE subject_id='493'")
rows, err := users.ExecuteN1qlQuery(query, nil)
var row x.Instruction
for rows.Next(&row) {
fmt.Printf("Row: %+v\n", row)
}
rows.Close()