Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for FromTimestamp (0.18 sec)

  1. internal/s3select/sql/timestampfuncs.go

    	var duration time.Duration
    	switch timePart {
    	case timePartYear:
    		return FromTimestamp(t.AddDate(int(qty), 0, 0)), nil
    	case timePartMonth:
    		return FromTimestamp(t.AddDate(0, int(qty), 0)), nil
    	case timePartDay:
    		return FromTimestamp(t.AddDate(0, 0, int(qty))), nil
    	case timePartHour:
    		duration = time.Duration(qty) * time.Hour
    	case timePartMinute:
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 4.8K bytes
    - Viewed (0)
  2. internal/s3select/sql/funceval.go

    	if !ok {
    		return nil, fmt.Errorf("%s() expects two timestamp arguments", sqlFnDateDiff)
    	}
    
    	return dateDiff(strings.ToUpper(d.DatePart), ts1, ts2)
    }
    
    func handleUTCNow() (*Value, error) {
    	return FromTimestamp(time.Now().UTC()), nil
    }
    
    func handleSQLSubstring(r Record, e *SubstringFunc, tableAlias string) (val *Value, err error) {
    	// Both forms `SUBSTRING('abc' FROM 2 FOR 1)` and
    	// SUBSTRING('abc', 2, 1) are supported.
    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)
  3. internal/s3select/sql/value_test.go

    		return FromFloat(math.Pi)
    	},
    	func() *Value {
    		return FromInt(0x1337)
    	},
    	func() *Value {
    		t, err := time.Parse(time.RFC3339, "2006-01-02T15:04:05Z")
    		if err != nil {
    			panic(err)
    		}
    		return FromTimestamp(t)
    	},
    	func() *Value {
    		return FromString("string contents")
    	},
    }
    
    // altValueBuilders contains one constructor for each value type.
    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)
  4. internal/s3select/sql/value.go

    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}
    }
    
    // FromNull creates a Value with Null value
    func FromNull() *Value {
    	return &Value{value: nil}
    }
    
    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