github.com/tobgu/qframe@v0.4.0/internal/scolumn/filters_gen.go (about) 1 package scolumn 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, c Column, comparatee string, bIndex index.Bool) error { 10 for i, x := range bIndex { 11 if !x { 12 s, isNull := c.stringAt(index[i]) 13 bIndex[i] = !isNull && s < comparatee 14 } 15 } 16 17 return nil 18 } 19 20 func lte(index index.Int, c Column, comparatee string, bIndex index.Bool) error { 21 for i, x := range bIndex { 22 if !x { 23 s, isNull := c.stringAt(index[i]) 24 bIndex[i] = !isNull && s <= comparatee 25 } 26 } 27 28 return nil 29 } 30 31 func gt(index index.Int, c Column, comparatee string, bIndex index.Bool) error { 32 for i, x := range bIndex { 33 if !x { 34 s, isNull := c.stringAt(index[i]) 35 bIndex[i] = !isNull && s > comparatee 36 } 37 } 38 39 return nil 40 } 41 42 func gte(index index.Int, c Column, comparatee string, bIndex index.Bool) error { 43 for i, x := range bIndex { 44 if !x { 45 s, isNull := c.stringAt(index[i]) 46 bIndex[i] = !isNull && s >= comparatee 47 } 48 } 49 50 return nil 51 } 52 53 func eq(index index.Int, c Column, comparatee string, bIndex index.Bool) error { 54 for i, x := range bIndex { 55 if !x { 56 s, isNull := c.stringAt(index[i]) 57 bIndex[i] = !isNull && s == comparatee 58 } 59 } 60 61 return nil 62 } 63 64 func lt2(index index.Int, col, col2 Column, bIndex index.Bool) error { 65 for i, x := range bIndex { 66 if !x { 67 s, isNull := col.stringAt(index[i]) 68 s2, isNull2 := col2.stringAt(index[i]) 69 bIndex[i] = !isNull && !isNull2 && s < s2 70 } 71 } 72 return nil 73 } 74 75 func lte2(index index.Int, col, col2 Column, bIndex index.Bool) error { 76 for i, x := range bIndex { 77 if !x { 78 s, isNull := col.stringAt(index[i]) 79 s2, isNull2 := col2.stringAt(index[i]) 80 bIndex[i] = !isNull && !isNull2 && s <= s2 81 } 82 } 83 return nil 84 } 85 86 func gt2(index index.Int, col, col2 Column, bIndex index.Bool) error { 87 for i, x := range bIndex { 88 if !x { 89 s, isNull := col.stringAt(index[i]) 90 s2, isNull2 := col2.stringAt(index[i]) 91 bIndex[i] = !isNull && !isNull2 && s > s2 92 } 93 } 94 return nil 95 } 96 97 func gte2(index index.Int, col, col2 Column, bIndex index.Bool) error { 98 for i, x := range bIndex { 99 if !x { 100 s, isNull := col.stringAt(index[i]) 101 s2, isNull2 := col2.stringAt(index[i]) 102 bIndex[i] = !isNull && !isNull2 && s >= s2 103 } 104 } 105 return nil 106 } 107 108 func eq2(index index.Int, col, col2 Column, bIndex index.Bool) error { 109 for i, x := range bIndex { 110 if !x { 111 s, isNull := col.stringAt(index[i]) 112 s2, isNull2 := col2.stringAt(index[i]) 113 bIndex[i] = !isNull && !isNull2 && s == s2 114 } 115 } 116 return nil 117 }