MCPcopy Index your code
hub / github.com/LissaGreense/GO4SQL / getInterfaceValue

Function getInterfaceValue

engine/engine_utils.go:9–22  ·  view source on GitHub ↗
(t token.Token)

Source from the content-addressed store, hash-verified

7)
8
9func getInterfaceValue(t token.Token) (ValueInterface, error) {
10 switch t.Type {
11 case token.NULL:
12 return NullValue{}, nil
13 case token.LITERAL:
14 castedInteger, err := strconv.Atoi(t.Literal)
15 if err != nil {
16 return nil, err
17 }
18 return IntegerValue{Value: castedInteger}, nil
19 default:
20 return StringValue{Value: t.Literal}, nil
21 }
22}
23
24func tokenMapper(inputToken token.Type) token.Type {
25 switch inputToken {

Callers 4

updateTableMethod · 0.85
insertIntoTableMethod · 0.85
ifValueInterfaceInArrayFunction · 0.85
getTifierValueFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected