コード例 #1
0
// NewStatement initializes a new Statement instance.
func NewStatement(ns string, set string, binNames ...string) *Statement {
	return &Statement{
		Namespace:  ns,
		SetName:    set,
		BinNames:   binNames,
		returnData: true,
		TaskId:     uint64(xornd.Int64()),
	}
}
コード例 #2
0
// Always set the taskId client-side to a non-zero random value
func (stmt *Statement) setTaskId() {
	for stmt.TaskId == 0 {
		stmt.TaskId = uint64(xornd.Int64())
	}
}