github.com/tobgu/qframe@v0.4.0/internal/template/placeholders.go (about)

     1  package template
     2  
     3  import (
     4  	"encoding/json"
     5  	"github.com/tobgu/qframe/qerrors"
     6  
     7  	"github.com/tobgu/qframe/internal/column"
     8  	"github.com/tobgu/qframe/internal/index"
     9  	"github.com/tobgu/qframe/types"
    10  )
    11  
    12  // This file contains definitions for data and functions that need to be added
    13  // manually for each data type.
    14  
    15  // TODO: Probably need a more general aggregation pattern, int -> float (average for example)
    16  var aggregations = map[string]func([]genericDataType) genericDataType{}
    17  
    18  func (c Column) DataType() types.DataType {
    19  	return types.None
    20  }
    21  
    22  // Functions not generated but needed to fulfill interface
    23  func (c Column) AppendByteStringAt(buf []byte, i uint32) []byte {
    24  	return nil
    25  }
    26  
    27  func (c Column) ByteSize() int {
    28  	return 0
    29  }
    30  
    31  func (c Column) Equals(index index.Int, other column.Column, otherIndex index.Int) bool {
    32  	return false
    33  }
    34  
    35  func (c Column) Filter(index index.Int, comparator interface{}, comparatee interface{}, bIndex index.Bool) error {
    36  	return nil
    37  }
    38  
    39  func (c Column) FunctionType() types.FunctionType {
    40  	return types.FunctionTypeBool
    41  }
    42  
    43  func (c Column) Marshaler(index index.Int) json.Marshaler {
    44  	return nil
    45  }
    46  
    47  func (c Column) StringAt(i uint32, naRep string) string {
    48  	return ""
    49  }
    50  
    51  func (c Column) Append(cols ...column.Column) (column.Column, error) {
    52  	return nil, qerrors.New("Append", "Not implemented")
    53  }
    54  
    55  func (c Comparable) Compare(i, j uint32) column.CompareResult {
    56  	return column.Equal
    57  }
    58  
    59  func (c Comparable) Hash(i uint32, seed uint64) uint64 {
    60  	return 0
    61  }