github.com/voedger/voedger@v0.0.0-20240520144910-273e84102129/pkg/exttinygo/impl_key.go (about)

     1  /*
     2    - Copyright (c) 2023-present unTill Software Development Group B.V.
     3      @author Michael Saigachenko
     4  */
     5  
     6  package exttinygo
     7  
     8  import (
     9  	"github.com/voedger/voedger/pkg/exttinygo/internal"
    10  	safe "github.com/voedger/voedger/pkg/state/isafestateapi"
    11  )
    12  
    13  func (k TKey) AsInt32(name string) int32 {
    14  	return internal.SafeStateAPI.KeyAsInt32(safe.TKey(k), name)
    15  }
    16  
    17  func (k TKey) AsInt64(name string) int64 {
    18  	return internal.SafeStateAPI.KeyAsInt64(safe.TKey(k), name)
    19  }
    20  
    21  func (k TKey) AsFloat32(name string) float32 {
    22  	return internal.SafeStateAPI.KeyAsFloat32(safe.TKey(k), name)
    23  }
    24  
    25  func (k TKey) AsFloat64(name string) float64 {
    26  	return internal.SafeStateAPI.KeyAsFloat64(safe.TKey(k), name)
    27  }
    28  
    29  func (k TKey) AsBytes(name string) []byte {
    30  	return internal.SafeStateAPI.KeyAsBytes(safe.TKey(k), name)
    31  }
    32  
    33  func (k TKey) AsString(name string) string {
    34  	return internal.SafeStateAPI.KeyAsString(safe.TKey(k), name)
    35  }
    36  
    37  func (k TKey) AsQName(name string) QName {
    38  	return QName(internal.SafeStateAPI.KeyAsQName(safe.TKey(k), name))
    39  }
    40  
    41  func (k TKey) AsBool(name string) bool {
    42  	return internal.SafeStateAPI.KeyAsBool(safe.TKey(k), name)
    43  }