// Code generated by the FlatBuffers compiler. DO NOT EDIT.

package dataprotocol

import (
	flatbuffers "github.com/google/flatbuffers/go"
)

type SQLResponseColumn struct {
	_tab flatbuffers.Table
}

func GetRootAsSQLResponseColumn(buf []byte, offset flatbuffers.UOffsetT) *SQLResponseColumn {
	n := flatbuffers.GetUOffsetT(buf[offset:])
	x := &SQLResponseColumn{}
	x.Init(buf, n+offset)
	return x
}

func (rcv *SQLResponseColumn) Init(buf []byte, i flatbuffers.UOffsetT) {
	rcv._tab.Bytes = buf
	rcv._tab.Pos = i
}

func (rcv *SQLResponseColumn) Table() flatbuffers.Table {
	return rcv._tab
}

func (rcv *SQLResponseColumn) ColumnName() []byte {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(4))
	if o != 0 {
		return rcv._tab.ByteVector(o + rcv._tab.Pos)
	}
	return nil
}

func (rcv *SQLResponseColumn) ColumnType() DataType {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(6))
	if o != 0 {
		return rcv._tab.GetInt8(o + rcv._tab.Pos)
	}
	return 0
}

func (rcv *SQLResponseColumn) MutateColumnType(n DataType) bool {
	return rcv._tab.MutateInt8Slot(6, n)
}

func (rcv *SQLResponseColumn) ColumnValue(obj *ColumnValues) *ColumnValues {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(8))
	if o != 0 {
		x := rcv._tab.Indirect(o + rcv._tab.Pos)
		if obj == nil {
			obj = new(ColumnValues)
		}
		obj.Init(rcv._tab.Bytes, x)
		return obj
	}
	return nil
}

func (rcv *SQLResponseColumn) ColumnComplexTypeInfo(obj *ComplexColumnTypeInfo) *ComplexColumnTypeInfo {
	o := flatbuffers.UOffsetT(rcv._tab.Offset(10))
	if o != 0 {
		x := rcv._tab.Indirect(o + rcv._tab.Pos)
		if obj == nil {
			obj = new(ComplexColumnTypeInfo)
		}
		obj.Init(rcv._tab.Bytes, x)
		return obj
	}
	return nil
}

func SQLResponseColumnStart(builder *flatbuffers.Builder) {
	builder.StartObject(4)
}
func SQLResponseColumnAddColumnName(builder *flatbuffers.Builder, columnName flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(0, flatbuffers.UOffsetT(columnName), 0)
}
func SQLResponseColumnAddColumnType(builder *flatbuffers.Builder, columnType int8) {
	builder.PrependInt8Slot(1, columnType, 0)
}
func SQLResponseColumnAddColumnValue(builder *flatbuffers.Builder, columnValue flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(2, flatbuffers.UOffsetT(columnValue), 0)
}
func SQLResponseColumnAddColumnComplexTypeInfo(builder *flatbuffers.Builder, columnComplexTypeInfo flatbuffers.UOffsetT) {
	builder.PrependUOffsetTSlot(3, flatbuffers.UOffsetT(columnComplexTypeInfo), 0)
}
func SQLResponseColumnEnd(builder *flatbuffers.Builder) flatbuffers.UOffsetT {
	return builder.EndObject()
}
