示例#1
0
文件: codex.go 项目: ngaut/RationalDb
func buildValue(bytes []byte, fieldType uint32) sqltypes.Value {
	switch fieldType {
	case schema.TYPE_FRACTIONAL:
		return sqltypes.MakeFractional(bytes)
	case schema.TYPE_NUMERIC:
		return sqltypes.MakeNumeric(bytes)
	}
	return sqltypes.MakeString(bytes)
}
示例#2
0
func buildValue(bytes []byte, fieldType int64) sqltypes.Value {
	switch fieldType {
	case schema.CAT_FRACTIONAL:
		return sqltypes.MakeFractional(bytes)
	case schema.CAT_NUMBER:
		return sqltypes.MakeNumeric(bytes)
	}
	return sqltypes.MakeString(bytes)
}