MCPcopy Create free account
hub / github.com/araddon/qlbridge / TypeFromString

Function TypeFromString

datasource/sqlite/schemawriter.go:97–107  ·  view source on GitHub ↗

TypeFromString given a string, return data type

(t string)

Source from the content-addressed store, hash-verified

95
96// TypeFromString given a string, return data type
97func TypeFromString(t string) value.ValueType {
98 switch strings.ToLower(t) {
99 case "integer":
100 // This isn't necessarily true, as integer could be bool
101 return value.IntType
102 case "real":
103 return value.NumberType
104 default:
105 return value.StringType
106 }
107}
108
109// ValueString convert a value.ValueType into a sqlite type descriptor
110func ValueString(t value.ValueType) string {

Callers 1

tableFromSQLFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected