Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for FromBool (0.39 sec)

  1. internal/s3select/sql/evaluate.go

    	if arr, ok := rhs.ToArray(); ok {
    		for _, element := range arr {
    			// If we have an array we are on the wrong level.
    			if cmp(element, *lhs) {
    				return FromBool(true), nil
    			}
    		}
    		return FromBool(false), nil
    	}
    
    	return FromBool(cmp(rhs, *lhs)), nil
    }
    
    func (e *Operand) evalNode(r Record, tableAlias string) (*Value, error) {
    	lval, lerr := e.Left.evalNode(r, tableAlias)
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 23 07:19:11 GMT 2023
    - 12K bytes
    - Viewed (0)
  2. internal/s3select/sql/value_test.go

    	"testing"
    	"time"
    )
    
    // valueBuilders contains one constructor for each value type.
    // Values should match if type is the same.
    var valueBuilders = []func() *Value{
    	FromNull,
    	func() *Value {
    		return FromBool(true)
    	},
    	func() *Value {
    		return FromBytes([]byte("byte contents"))
    	},
    	func() *Value {
    		return FromFloat(math.Pi)
    	},
    	func() *Value {
    		return FromInt(0x1337)
    	},
    	func() *Value {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Mon Mar 06 16:56:10 GMT 2023
    - 12.5K bytes
    - Viewed (0)
  3. internal/s3select/simdj/record.go

    			v, err := iter.Float()
    			return sql.FromFloat(v), err
    		}
    		return sql.FromInt(v), nil
    	case simdjson.TypeBool:
    		v, err := iter.Bool()
    		if err != nil {
    			return nil, err
    		}
    		return sql.FromBool(v), nil
    	case simdjson.TypeNull:
    		return sql.FromNull(), nil
    	case simdjson.TypeObject, simdjson.TypeArray:
    		b, err := iter.MarshalJSON()
    		return sql.FromBytes(b), err
    	}
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 5.4K bytes
    - Viewed (0)
  4. internal/s3select/sql/funceval.go

    		s, err := stringCast(v)
    		return FromString(s), err
    
    	case castTimestamp:
    		t, err := timestampCast(v)
    		return FromTimestamp(t), err
    
    	case castBool:
    		b, err := boolCast(v)
    		return FromBool(b), err
    
    	case castDecimal, castNumeric:
    		fallthrough
    
    	default:
    		return nil, errUnimplementedCast
    	}
    }
    
    func intCast(v *Value) (int64, error) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 13.2K bytes
    - Viewed (0)
  5. internal/s3select/sql/value.go

    func FromInt(f int64) *Value {
    	return &Value{value: f}
    }
    
    // FromString creates a Value from a string
    func FromString(str string) *Value {
    	return &Value{value: str}
    }
    
    // FromBool creates a Value from a bool
    func FromBool(b bool) *Value {
    	return &Value{value: b}
    }
    
    // FromTimestamp creates a Value from a timestamp
    func FromTimestamp(t time.Time) *Value {
    	return &Value{value: t}
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 20.2K bytes
    - Viewed (0)
Back to top