本文整理汇总了Golang中github.com/youtube/vitess/go/bson.EncodeInt64函数的典型用法代码示例。如果您正苦于以下问题:Golang EncodeInt64函数的具体用法?Golang EncodeInt64怎么用?Golang EncodeInt64使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了EncodeInt64函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: MarshalBson
// MarshalBson bson-encodes Session.
func (session *Session) MarshalBson(buf *bytes2.ChunkedWriter, key string) {
bson.EncodeOptionalPrefix(buf, bson.Object, key)
lenWriter := bson.NewLenWriter(buf)
bson.EncodeInt64(buf, "SessionId", session.SessionId)
bson.EncodeInt64(buf, "TransactionId", session.TransactionId)
lenWriter.Close()
}
示例2: MarshalBson
func (session *Session) MarshalBson(buf *bytes2.ChunkedWriter) {
lenWriter := bson.NewLenWriter(buf)
bson.EncodeInt64(buf, "TransactionId", session.TransactionId)
bson.EncodeInt64(buf, "SessionId", session.SessionId)
buf.WriteByte(0)
lenWriter.RecordLen()
}
示例3: MarshalBson
// MarshalBson bson-encodes Field.
func (field *Field) MarshalBson(buf *bytes2.ChunkedWriter, key string) {
bson.EncodeOptionalPrefix(buf, bson.Object, key)
lenWriter := bson.NewLenWriter(buf)
bson.EncodeString(buf, "Name", field.Name)
bson.EncodeInt64(buf, "Type", field.Type)
bson.EncodeInt64(buf, "Flags", field.Flags)
lenWriter.Close()
}
示例4: MarshalBson
func (qr *QueryResult) MarshalBson(buf *bytes2.ChunkedWriter) {
lenWriter := bson.NewLenWriter(buf)
EncodeFieldsBson(qr.Fields, "Fields", buf)
bson.EncodeInt64(buf, "RowsAffected", int64(qr.RowsAffected))
bson.EncodeInt64(buf, "InsertId", int64(qr.InsertId))
EncodeRowsBson(qr.Rows, "Rows", buf)
buf.WriteByte(0)
lenWriter.RecordLen()
}
示例5: MarshalBson
func (ql *QueryList) MarshalBson(buf *bytes2.ChunkedWriter, key string) {
bson.EncodeOptionalPrefix(buf, bson.Object, key)
lenWriter := bson.NewLenWriter(buf)
EncodeQueriesBson(ql.Queries, "Queries", buf)
bson.EncodeInt64(buf, "TransactionId", ql.TransactionId)
bson.EncodeInt64(buf, "SessionId", ql.SessionId)
buf.WriteByte(0)
lenWriter.RecordLen()
}
示例6: MarshalBson
func (ste *StreamEvent) MarshalBson(buf *bytes2.ChunkedWriter) {
lenWriter := bson.NewLenWriter(buf)
bson.EncodeString(buf, "Category", ste.Category)
bson.EncodeString(buf, "TableName", ste.TableName)
bson.EncodeStringArray(buf, "PKColNames", ste.PKColNames)
MarshalPKValuesBson(buf, "PKValues", ste.PKValues)
bson.EncodeString(buf, "Sql", ste.Sql)
bson.EncodeInt64(buf, "Timestamp", ste.Timestamp)
bson.EncodeInt64(buf, "GroupId", ste.GroupId)
buf.WriteByte(0)
lenWriter.RecordLen()
}
示例7: MarshalBson
func (stmt *Statement) MarshalBson(buf *bytes2.ChunkedWriter) {
lenWriter := bson.NewLenWriter(buf)
bson.EncodeInt64(buf, "Category", int64(stmt.Category))
bson.EncodeBinary(buf, "Sql", stmt.Sql)
buf.WriteByte(0)
lenWriter.RecordLen()
}
示例8: MarshalBson
func (blt *BinlogTransaction) MarshalBson(buf *bytes2.ChunkedWriter, key string) {
bson.EncodeOptionalPrefix(buf, bson.Object, key)
lenWriter := bson.NewLenWriter(buf)
MarshalStatementsBson(buf, "Statements", blt.Statements)
bson.EncodeInt64(buf, "GroupId", blt.GroupId)
buf.WriteByte(0)
lenWriter.RecordLen()
}
示例9: MarshalBson
// MarshalBson bson-encodes MyType.
func (myType *MyType) MarshalBson(buf *bytes2.ChunkedWriter, key string) {
bson.EncodeOptionalPrefix(buf, bson.Object, key)
lenWriter := bson.NewLenWriter(buf)
bson.EncodeInt64(buf, "Val", myType.Val)
lenWriter.Close()
}
示例10: MarshalBson
// MarshalBson bson-encodes RPCError.
func (rPCError *RPCError) MarshalBson(buf *bytes2.ChunkedWriter, key string) {
bson.EncodeOptionalPrefix(buf, bson.Object, key)
lenWriter := bson.NewLenWriter(buf)
bson.EncodeInt64(buf, "Code", rPCError.Code)
bson.EncodeString(buf, "Message", rPCError.Message)
lenWriter.Close()
}
示例11: MarshalBson
// MarshalBson bson-encodes QueryList.
func (queryList *QueryList) MarshalBson(buf *bytes2.ChunkedWriter, key string) {
bson.EncodeOptionalPrefix(buf, bson.Object, key)
lenWriter := bson.NewLenWriter(buf)
// []BoundQuery
{
bson.EncodePrefix(buf, bson.Array, "Queries")
lenWriter := bson.NewLenWriter(buf)
for _i, _v1 := range queryList.Queries {
_v1.MarshalBson(buf, bson.Itoa(_i))
}
lenWriter.Close()
}
bson.EncodeInt64(buf, "SessionId", queryList.SessionId)
bson.EncodeInt64(buf, "TransactionId", queryList.TransactionId)
lenWriter.Close()
}
示例12: MarshalBson
// MarshalBson bson-encodes BinlogTransaction.
func (binlogTransaction *BinlogTransaction) MarshalBson(buf *bytes2.ChunkedWriter, key string) {
bson.EncodeOptionalPrefix(buf, bson.Object, key)
lenWriter := bson.NewLenWriter(buf)
// []Statement
{
bson.EncodePrefix(buf, bson.Array, "Statements")
lenWriter := bson.NewLenWriter(buf)
for _i, _v1 := range binlogTransaction.Statements {
_v1.MarshalBson(buf, bson.Itoa(_i))
}
lenWriter.Close()
}
bson.EncodeInt64(buf, "Timestamp", binlogTransaction.Timestamp)
bson.EncodeInt64(buf, "GroupId", binlogTransaction.GroupId)
lenWriter.Close()
}
示例13: MarshalBson
// MarshalBson bson-encodes BlpPosition.
func (blpPosition *BlpPosition) MarshalBson(buf *bytes2.ChunkedWriter, key string) {
bson.EncodeOptionalPrefix(buf, bson.Object, key)
lenWriter := bson.NewLenWriter(buf)
bson.EncodeUint32(buf, "Uid", blpPosition.Uid)
bson.EncodeInt64(buf, "GroupId", blpPosition.GroupId)
lenWriter.Close()
}
示例14: MarshalBson
func (req *RequestBson) MarshalBson(buf *bytes2.ChunkedWriter) {
lenWriter := bson.NewLenWriter(buf)
bson.EncodeString(buf, "ServiceMethod", req.ServiceMethod)
bson.EncodeInt64(buf, "Seq", int64(req.Seq))
buf.WriteByte(0)
lenWriter.RecordLen()
}
示例15: MarshalBson
// MarshalBson bson-encodes ZkStat.
func (zkStat *ZkStat) MarshalBson(buf *bytes2.ChunkedWriter, key string) {
bson.EncodeOptionalPrefix(buf, bson.Object, key)
lenWriter := bson.NewLenWriter(buf)
bson.EncodeInt64(buf, "Czxid", zkStat.czxid)
bson.EncodeInt64(buf, "Mzxid", zkStat.mzxid)
bson.EncodeTime(buf, "CTime", zkStat.cTime)
bson.EncodeTime(buf, "MTime", zkStat.mTime)
bson.EncodeInt(buf, "Version", zkStat.version)
bson.EncodeInt(buf, "CVersion", zkStat.cVersion)
bson.EncodeInt(buf, "AVersion", zkStat.aVersion)
bson.EncodeInt64(buf, "EphemeralOwner", zkStat.ephemeralOwner)
bson.EncodeInt(buf, "DataLength", zkStat.dataLength)
bson.EncodeInt(buf, "NumChildren", zkStat.numChildren)
bson.EncodeInt64(buf, "Pzxid", zkStat.pzxid)
lenWriter.Close()
}