Beispiel #1
0
func writeQueryMsg(buf *pool.Buffer, query interface{}, params ...interface{}) error {
	buf.StartMessage(queryMsg)
	bytes, err := orm.AppendQuery(buf.Bytes, query, params...)
	if err != nil {
		buf.Reset()
		return err
	}
	buf.Bytes = bytes
	buf.WriteByte(0x0)
	buf.FinishMessage()
	return nil
}