Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for timestampCompare (0.19 sec)

  1. internal/s3select/sql/value_contrib.go

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package sql
    
    import "time"
    
    func timestampCompare(op string, left, right time.Time) bool {
    	switch op {
    	case opLt:
    		return left.Before(right)
    	case opLte:
    		return left.Before(right) || left.Equal(right)
    	case opGt:
    		return left.After(right)
    	case opGte:
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 1K bytes
    - Viewed (0)
  2. internal/s3select/sql/value.go

    	boolA, ok2b := a.ToBool()
    	if ok1b && ok2b {
    		return boolCompare(op, boolV, boolA)
    	}
    
    	timestampV, ok1t := v.ToTimestamp()
    	timestampA, ok2t := a.ToTimestamp()
    	if ok1t && ok2t {
    		return timestampCompare(op, timestampV, timestampA), nil
    	}
    
    	// Types cannot be compared, they do not match.
    	switch op {
    	case opEq:
    		return false, nil
    	case opIneq:
    		return true, 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