You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: comStmtPrepareOk.go
    path of file: ./repos/keploy/pkg/proxy/integrations/mysqlparser
    
    the code of the file until where you have to start completion: package mysqlparser

import (
	"bytes"
	"encoding/binary"
	"errors"

	"go.keploy.io/server/pkg/models"
)

type StmtPrepareOk struct {
	Status       byte               `json:"status,omitempty" yaml:"status,omitempty,flow"`
	StatementID  uint32             `json:"statement_id,omitempty" yaml:"statement_id,omitempty,flow"`
	NumColumns   uint16             `json:"num_columns,omitempty" yaml:"num_columns,omitempty,flow"`
	NumParams    uint16             `json:"num_params,omitempty" yaml:"num_params,omitempty,flow"`
	WarningCount uint16             `json:"warning_count,omitempty" yaml:"warning_count,omitempty,flo
    
func decodeComStmtPrepareOk(data []byte) (*StmtPrepareOk, error) {
	if len(data) < 12 {
		return nil, errors.New("data length is not enough for COM_STMT_PREPARE_OK")
	}

	response := &StmtPrepareOk{
		Status:       data[0],
		StatementID:  binary.LittleEndian.Uint32(data[1:5]),
		NumColumns:   binary.LittleEndian.Uint16(data[5:7]),
		NumParams:    binary.LittleEndian.Uint16(data[7:9]),
		WarningCount: binary.LittleEndian.Uint16(data[10:12]),
	}

	offset := 12

	if response.NumParams > 0 {
		for i := uint16(0); i < response.NumParams; i++ {
			columnDef := ColumnDefinition{}
			columnHeader := PacketHeader{
				PacketLength:     data[offset],
				PacketSequenceID: data[offset+3],
			}
			columnDef.PacketHeader = columnHeader
			offset += 4 //Header of packet
			var err error
			columnDef.Catalog, err = readLengthEncodedString(data, &offset)
			if err != nil {
				return nil, err
			}
			columnDef.Schema, err = readLengthEncodedString(data, &offset)
			if err != nil {
				return nil, err
			}
			columnDef.Table, err = readLengthEncodedString(data, &offset)
			if err != nil {
				return nil, err
			}
			columnDef.OrgTable, err = readLengthEncodedString(data, &offset)
			if err != nil {
				return nil, err
			}
			columnDef.Name, err = readLengthEncodedString(data, &offset)
			if err != nil {
				return nil, err
			}
			columnDef.OrgName, err = readLengthEncodedString(data, &offset)
			if err != nil {
				return nil, err
			}
			offset++ //filler
			columnDef.CharacterSet = binary.LittleEndian.Uint16(data[offset : offset+2])
			columnDef.ColumnLength = binary.LittleEndian.Uint32(data[offset+2 : offset+6])
			columnDef.ColumnType = data[offset+6]
			columnDef.Flags = binary.LittleEndian.Uint16(data[offset+7 : offset+9])
			columnDef.Decimals = data[offset+9]
			offset += 10
			offset += 2 // filler
			response.ParamDefs = append(response.ParamDefs, columnDef)
		}
		offset += 9 //skip EOF packet for Parameter Definition
	}

	if response.NumColumns > 0 {
		for i := uint16(0); i < response.NumColumns; i++ {
			columnDef := ColumnDefinition{}
			columnHeader := PacketHeader{
				PacketLength:     data[offset],
				PacketSequenceID: data[offset+3],
			}
			columnDef.PacketHeader = columnHeader
			offset += 4
			var err error
			columnDef.Catalog, err = readLengthEncodedString(data, &offset)
			if err != nil {
				return nil, err
			}
			columnDef.Schema, err = readLengthEncodedString(data, &offset)
			if err != nil {
				return nil, err
			}
			columnDef.Table, err = readLengthEncodedString(data, &offset)
			if err != nil {
				return nil, err
			}
			columnDef.OrgTable, err = readLengthEncodedString(data, &offset)
			if err != nil {
				return nil, err
			}
			columnDef.Name, err = readLengthEncodedString(data, &offset)
			if err != nil {
				return nil, err
			}
			columnDef.OrgName, err = readLengthEncodedString(data, &offset)
			if err != nil {
				return nil, err
			}
			offset++ //filler
			columnDef.CharacterSet = binary.LittleEndian.Uint16(data[offset : offset+2])
			columnDef.ColumnLength = binary.LittleEndian.Uint32(data[offset+2 : offset+6])
			columnDef.ColumnType = data[offset+6]
			columnDef.Flags = binary.LittleEndian.Uint16(data[offset+7 : offset+9])
			columnDef.Decimals = data[offset+9]
			offset += 10
			offset += 2 // filler
			response.ColumnDefs = append(response.ColumnDefs, columnDef)
		}
		offset += 9 //skip EOF packet for Column Definitions
	}

	return response, nil
}