github.com/tobgu/qframe@v0.4.0/internal/ecolumn/filters_gen.go (about)

     1  package ecolumn
     2  
     3  import (
     4  	"github.com/tobgu/qframe/internal/index"
     5  )
     6  
     7  // Code generated from template/... DO NOT EDIT
     8  
     9  func lt(index index.Int, column []enumVal, comparatee enumVal, bIndex index.Bool) {
    10  	for i, x := range bIndex {
    11  		if !x {
    12  			enum := column[index[i]]
    13  			bIndex[i] = !enum.isNull() && enum.compVal() < comparatee.compVal()
    14  		}
    15  	}
    16  }
    17  
    18  func lte(index index.Int, column []enumVal, comparatee enumVal, bIndex index.Bool) {
    19  	for i, x := range bIndex {
    20  		if !x {
    21  			enum := column[index[i]]
    22  			bIndex[i] = !enum.isNull() && enum.compVal() <= comparatee.compVal()
    23  		}
    24  	}
    25  }
    26  
    27  func gt(index index.Int, column []enumVal, comparatee enumVal, bIndex index.Bool) {
    28  	for i, x := range bIndex {
    29  		if !x {
    30  			enum := column[index[i]]
    31  			bIndex[i] = !enum.isNull() && enum.compVal() > comparatee.compVal()
    32  		}
    33  	}
    34  }
    35  
    36  func gte(index index.Int, column []enumVal, comparatee enumVal, bIndex index.Bool) {
    37  	for i, x := range bIndex {
    38  		if !x {
    39  			enum := column[index[i]]
    40  			bIndex[i] = !enum.isNull() && enum.compVal() >= comparatee.compVal()
    41  		}
    42  	}
    43  }
    44  
    45  func eq(index index.Int, column []enumVal, comparatee enumVal, bIndex index.Bool) {
    46  	for i, x := range bIndex {
    47  		if !x {
    48  			enum := column[index[i]]
    49  			bIndex[i] = !enum.isNull() && enum.compVal() == comparatee.compVal()
    50  		}
    51  	}
    52  }
    53  
    54  func lt2(index index.Int, col, col2 []enumVal, bIndex index.Bool) {
    55  	for i, x := range bIndex {
    56  		if !x {
    57  			enum, enum2 := col[index[i]], col2[index[i]]
    58  			bIndex[i] = !enum.isNull() && !enum2.isNull() && enum.compVal() < enum2.compVal()
    59  		}
    60  	}
    61  }
    62  
    63  func lte2(index index.Int, col, col2 []enumVal, bIndex index.Bool) {
    64  	for i, x := range bIndex {
    65  		if !x {
    66  			enum, enum2 := col[index[i]], col2[index[i]]
    67  			bIndex[i] = !enum.isNull() && !enum2.isNull() && enum.compVal() <= enum2.compVal()
    68  		}
    69  	}
    70  }
    71  
    72  func gt2(index index.Int, col, col2 []enumVal, bIndex index.Bool) {
    73  	for i, x := range bIndex {
    74  		if !x {
    75  			enum, enum2 := col[index[i]], col2[index[i]]
    76  			bIndex[i] = !enum.isNull() && !enum2.isNull() && enum.compVal() > enum2.compVal()
    77  		}
    78  	}
    79  }
    80  
    81  func gte2(index index.Int, col, col2 []enumVal, bIndex index.Bool) {
    82  	for i, x := range bIndex {
    83  		if !x {
    84  			enum, enum2 := col[index[i]], col2[index[i]]
    85  			bIndex[i] = !enum.isNull() && !enum2.isNull() && enum.compVal() >= enum2.compVal()
    86  		}
    87  	}
    88  }
    89  
    90  func eq2(index index.Int, col, col2 []enumVal, bIndex index.Bool) {
    91  	for i, x := range bIndex {
    92  		if !x {
    93  			enum, enum2 := col[index[i]], col2[index[i]]
    94  			bIndex[i] = !enum.isNull() && !enum2.isNull() && enum.compVal() == enum2.compVal()
    95  		}
    96  	}
    97  }