1/* 2Copyright 2014 SAP SE 3 4Licensed under the Apache License, Version 2.0 (the "License"); 5you may not use this file except in compliance with the License. 6You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10Unless required by applicable law or agreed to in writing, software 11distributed under the License is distributed on an "AS IS" BASIS, 12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13See the License for the specific language governing permissions and 14limitations under the License. 15*/ 16 17package protocol 18 19// TableResult is the package internal representation of a table like output parameter of a stored procedure. 20type TableResult struct { 21 id uint64 22 resultFieldSet *ResultFieldSet 23 fieldValues *FieldValues 24 attrs partAttributes 25} 26 27func newTableResult(s *Session, size int) *TableResult { 28 return &TableResult{ 29 resultFieldSet: newResultFieldSet(size), 30 fieldValues: newFieldValues(), 31 } 32} 33 34// ID returns the resultset id. 35func (r *TableResult) ID() uint64 { 36 return r.id 37} 38 39// FieldSet returns the field metadata of the table. 40func (r *TableResult) FieldSet() *ResultFieldSet { 41 return r.resultFieldSet 42} 43 44// FieldValues returns the field values (fetched resultset part) of the table. 45func (r *TableResult) FieldValues() *FieldValues { 46 return r.fieldValues 47} 48 49// Attrs returns the PartAttributes interface of the fetched resultset part. 50func (r *TableResult) Attrs() PartAttributes { 51 return r.attrs 52} 53