MCPcopy Create free account
hub / github.com/LissaGreense/GO4SQL / getTifierValue

Function getTifierValue

engine/engine.go:768–781  ·  view source on GitHub ↗
(tifier ast.Tifier, row map[string]ValueInterface)

Source from the content-addressed store, hash-verified

766}
767
768func getTifierValue(tifier ast.Tifier, row map[string]ValueInterface) (ValueInterface, error) {
769 switch mappedTifier := tifier.(type) {
770 case ast.Identifier:
771 value, ok := row[mappedTifier.GetToken().Literal]
772 if ok == false {
773 return nil, &ColumnDoesNotExistError{tableName: "", columnName: mappedTifier.GetToken().Literal}
774 }
775 return value, nil
776 case ast.Anonymitifier:
777 return getInterfaceValue(mappedTifier.GetToken())
778 default:
779 return nil, &UnsupportedValueType{tifier.GetToken().Literal}
780 }
781}

Callers 2

processContainExpressionFunction · 0.85

Calls 2

getInterfaceValueFunction · 0.85
GetTokenMethod · 0.65

Tested by

no test coverage detected