github.com/voedger/voedger@v0.0.0-20240520144910-273e84102129/pkg/sys/sqlquery/types.go (about)

     1  /*
     2   * Copyright (c) 2022-present unTill Pro, Ltd.
     3   */
     4  
     5  package sqlquery
     6  
     7  import (
     8  	"github.com/voedger/voedger/pkg/istructs"
     9  )
    10  
    11  type filter struct {
    12  	acceptAll bool
    13  	fields    map[string]bool
    14  }
    15  
    16  func (f *filter) filter(field string) bool {
    17  	if f.acceptAll {
    18  		return true
    19  	}
    20  	_, ok := f.fields[field]
    21  	return ok
    22  }
    23  
    24  type keyPart struct {
    25  	name  string
    26  	value []byte
    27  }
    28  
    29  type result struct {
    30  	istructs.NullObject
    31  	value string
    32  }
    33  
    34  func (o *result) AsString(string) string { return o.value }