Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for trimChars (0.21 sec)

  1. internal/s3select/sql/funceval.go

    	return FromString(res), err
    }
    
    func handleSQLTrim(r Record, e *TrimFunc, tableAlias string) (res *Value, err error) {
    	chars := ""
    	ok := false
    	if e.TrimChars != nil {
    		charsV, cerr := e.TrimChars.evalNode(r, tableAlias)
    		if cerr != nil {
    			return nil, cerr
    		}
    		inferTypeAsString(charsV)
    		chars, ok = charsV.ToString()
    		if !ok {
    			return nil, errNonStringTrimArg
    		}
    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)
  2. internal/s3select/sql/analysis.go

    		}
    		for _, arg := range e.SFunc.ArgsList {
    			result.combine(arg.analyze(s))
    		}
    		return result
    
    	case sqlFnTrim:
    		if e.Trim.TrimChars != nil {
    			result.combine(e.Trim.TrimChars.analyze(s))
    		}
    		if e.Trim.TrimFrom != nil {
    			result.combine(e.Trim.TrimFrom.analyze(s))
    		}
    		return result
    
    	case sqlFnSubstring:
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Sat Dec 23 07:19:11 GMT 2023
    - 8.5K bytes
    - Viewed (0)
  3. internal/s3select/sql/stringfuncs.go

    }
    
    const (
    	trimLeading  = "LEADING"
    	trimTrailing = "TRAILING"
    	trimBoth     = "BOTH"
    )
    
    func evalSQLTrim(where *string, trimChars, text string) (result string, err error) {
    	cutSet := " "
    	if trimChars != "" {
    		cutSet = trimChars
    	}
    
    	trimFunc := strings.Trim
    	switch {
    	case where == nil:
    	case *where == trimBoth:
    	case *where == trimLeading:
    		trimFunc = strings.TrimLeft
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 4.2K bytes
    - Viewed (0)
  4. internal/s3select/sql/parser.go

    }
    
    // TrimFunc represents TRIM sql function
    type TrimFunc struct {
    	TrimWhere *string      `parser:" \"TRIM\" \"(\" ( @( \"LEADING\" | \"TRAILING\" | \"BOTH\" ) "`
    	TrimChars *PrimaryTerm `parser:"             @@?  "`
    	TrimFrom  *PrimaryTerm `parser:"             \"FROM\" )? @@ \")\" "`
    }
    
    // DateAddFunc represents the DATE_ADD function
    type DateAddFunc struct {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 12.9K bytes
    - Viewed (0)
Back to top