where.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. // Code generated by ent, DO NOT EDIT.
  2. package userattributevalue
  3. import (
  4. "time"
  5. "entgo.io/ent/dialect/sql"
  6. "entgo.io/ent/dialect/sql/sqlgraph"
  7. "github.com/Wei-Shaw/sub2api/ent/predicate"
  8. )
  9. // ID filters vertices based on their ID field.
  10. func ID(id int64) predicate.UserAttributeValue {
  11. return predicate.UserAttributeValue(sql.FieldEQ(FieldID, id))
  12. }
  13. // IDEQ applies the EQ predicate on the ID field.
  14. func IDEQ(id int64) predicate.UserAttributeValue {
  15. return predicate.UserAttributeValue(sql.FieldEQ(FieldID, id))
  16. }
  17. // IDNEQ applies the NEQ predicate on the ID field.
  18. func IDNEQ(id int64) predicate.UserAttributeValue {
  19. return predicate.UserAttributeValue(sql.FieldNEQ(FieldID, id))
  20. }
  21. // IDIn applies the In predicate on the ID field.
  22. func IDIn(ids ...int64) predicate.UserAttributeValue {
  23. return predicate.UserAttributeValue(sql.FieldIn(FieldID, ids...))
  24. }
  25. // IDNotIn applies the NotIn predicate on the ID field.
  26. func IDNotIn(ids ...int64) predicate.UserAttributeValue {
  27. return predicate.UserAttributeValue(sql.FieldNotIn(FieldID, ids...))
  28. }
  29. // IDGT applies the GT predicate on the ID field.
  30. func IDGT(id int64) predicate.UserAttributeValue {
  31. return predicate.UserAttributeValue(sql.FieldGT(FieldID, id))
  32. }
  33. // IDGTE applies the GTE predicate on the ID field.
  34. func IDGTE(id int64) predicate.UserAttributeValue {
  35. return predicate.UserAttributeValue(sql.FieldGTE(FieldID, id))
  36. }
  37. // IDLT applies the LT predicate on the ID field.
  38. func IDLT(id int64) predicate.UserAttributeValue {
  39. return predicate.UserAttributeValue(sql.FieldLT(FieldID, id))
  40. }
  41. // IDLTE applies the LTE predicate on the ID field.
  42. func IDLTE(id int64) predicate.UserAttributeValue {
  43. return predicate.UserAttributeValue(sql.FieldLTE(FieldID, id))
  44. }
  45. // CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
  46. func CreatedAt(v time.Time) predicate.UserAttributeValue {
  47. return predicate.UserAttributeValue(sql.FieldEQ(FieldCreatedAt, v))
  48. }
  49. // UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
  50. func UpdatedAt(v time.Time) predicate.UserAttributeValue {
  51. return predicate.UserAttributeValue(sql.FieldEQ(FieldUpdatedAt, v))
  52. }
  53. // UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
  54. func UserID(v int64) predicate.UserAttributeValue {
  55. return predicate.UserAttributeValue(sql.FieldEQ(FieldUserID, v))
  56. }
  57. // AttributeID applies equality check predicate on the "attribute_id" field. It's identical to AttributeIDEQ.
  58. func AttributeID(v int64) predicate.UserAttributeValue {
  59. return predicate.UserAttributeValue(sql.FieldEQ(FieldAttributeID, v))
  60. }
  61. // Value applies equality check predicate on the "value" field. It's identical to ValueEQ.
  62. func Value(v string) predicate.UserAttributeValue {
  63. return predicate.UserAttributeValue(sql.FieldEQ(FieldValue, v))
  64. }
  65. // CreatedAtEQ applies the EQ predicate on the "created_at" field.
  66. func CreatedAtEQ(v time.Time) predicate.UserAttributeValue {
  67. return predicate.UserAttributeValue(sql.FieldEQ(FieldCreatedAt, v))
  68. }
  69. // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
  70. func CreatedAtNEQ(v time.Time) predicate.UserAttributeValue {
  71. return predicate.UserAttributeValue(sql.FieldNEQ(FieldCreatedAt, v))
  72. }
  73. // CreatedAtIn applies the In predicate on the "created_at" field.
  74. func CreatedAtIn(vs ...time.Time) predicate.UserAttributeValue {
  75. return predicate.UserAttributeValue(sql.FieldIn(FieldCreatedAt, vs...))
  76. }
  77. // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
  78. func CreatedAtNotIn(vs ...time.Time) predicate.UserAttributeValue {
  79. return predicate.UserAttributeValue(sql.FieldNotIn(FieldCreatedAt, vs...))
  80. }
  81. // CreatedAtGT applies the GT predicate on the "created_at" field.
  82. func CreatedAtGT(v time.Time) predicate.UserAttributeValue {
  83. return predicate.UserAttributeValue(sql.FieldGT(FieldCreatedAt, v))
  84. }
  85. // CreatedAtGTE applies the GTE predicate on the "created_at" field.
  86. func CreatedAtGTE(v time.Time) predicate.UserAttributeValue {
  87. return predicate.UserAttributeValue(sql.FieldGTE(FieldCreatedAt, v))
  88. }
  89. // CreatedAtLT applies the LT predicate on the "created_at" field.
  90. func CreatedAtLT(v time.Time) predicate.UserAttributeValue {
  91. return predicate.UserAttributeValue(sql.FieldLT(FieldCreatedAt, v))
  92. }
  93. // CreatedAtLTE applies the LTE predicate on the "created_at" field.
  94. func CreatedAtLTE(v time.Time) predicate.UserAttributeValue {
  95. return predicate.UserAttributeValue(sql.FieldLTE(FieldCreatedAt, v))
  96. }
  97. // UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
  98. func UpdatedAtEQ(v time.Time) predicate.UserAttributeValue {
  99. return predicate.UserAttributeValue(sql.FieldEQ(FieldUpdatedAt, v))
  100. }
  101. // UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
  102. func UpdatedAtNEQ(v time.Time) predicate.UserAttributeValue {
  103. return predicate.UserAttributeValue(sql.FieldNEQ(FieldUpdatedAt, v))
  104. }
  105. // UpdatedAtIn applies the In predicate on the "updated_at" field.
  106. func UpdatedAtIn(vs ...time.Time) predicate.UserAttributeValue {
  107. return predicate.UserAttributeValue(sql.FieldIn(FieldUpdatedAt, vs...))
  108. }
  109. // UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
  110. func UpdatedAtNotIn(vs ...time.Time) predicate.UserAttributeValue {
  111. return predicate.UserAttributeValue(sql.FieldNotIn(FieldUpdatedAt, vs...))
  112. }
  113. // UpdatedAtGT applies the GT predicate on the "updated_at" field.
  114. func UpdatedAtGT(v time.Time) predicate.UserAttributeValue {
  115. return predicate.UserAttributeValue(sql.FieldGT(FieldUpdatedAt, v))
  116. }
  117. // UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
  118. func UpdatedAtGTE(v time.Time) predicate.UserAttributeValue {
  119. return predicate.UserAttributeValue(sql.FieldGTE(FieldUpdatedAt, v))
  120. }
  121. // UpdatedAtLT applies the LT predicate on the "updated_at" field.
  122. func UpdatedAtLT(v time.Time) predicate.UserAttributeValue {
  123. return predicate.UserAttributeValue(sql.FieldLT(FieldUpdatedAt, v))
  124. }
  125. // UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
  126. func UpdatedAtLTE(v time.Time) predicate.UserAttributeValue {
  127. return predicate.UserAttributeValue(sql.FieldLTE(FieldUpdatedAt, v))
  128. }
  129. // UserIDEQ applies the EQ predicate on the "user_id" field.
  130. func UserIDEQ(v int64) predicate.UserAttributeValue {
  131. return predicate.UserAttributeValue(sql.FieldEQ(FieldUserID, v))
  132. }
  133. // UserIDNEQ applies the NEQ predicate on the "user_id" field.
  134. func UserIDNEQ(v int64) predicate.UserAttributeValue {
  135. return predicate.UserAttributeValue(sql.FieldNEQ(FieldUserID, v))
  136. }
  137. // UserIDIn applies the In predicate on the "user_id" field.
  138. func UserIDIn(vs ...int64) predicate.UserAttributeValue {
  139. return predicate.UserAttributeValue(sql.FieldIn(FieldUserID, vs...))
  140. }
  141. // UserIDNotIn applies the NotIn predicate on the "user_id" field.
  142. func UserIDNotIn(vs ...int64) predicate.UserAttributeValue {
  143. return predicate.UserAttributeValue(sql.FieldNotIn(FieldUserID, vs...))
  144. }
  145. // AttributeIDEQ applies the EQ predicate on the "attribute_id" field.
  146. func AttributeIDEQ(v int64) predicate.UserAttributeValue {
  147. return predicate.UserAttributeValue(sql.FieldEQ(FieldAttributeID, v))
  148. }
  149. // AttributeIDNEQ applies the NEQ predicate on the "attribute_id" field.
  150. func AttributeIDNEQ(v int64) predicate.UserAttributeValue {
  151. return predicate.UserAttributeValue(sql.FieldNEQ(FieldAttributeID, v))
  152. }
  153. // AttributeIDIn applies the In predicate on the "attribute_id" field.
  154. func AttributeIDIn(vs ...int64) predicate.UserAttributeValue {
  155. return predicate.UserAttributeValue(sql.FieldIn(FieldAttributeID, vs...))
  156. }
  157. // AttributeIDNotIn applies the NotIn predicate on the "attribute_id" field.
  158. func AttributeIDNotIn(vs ...int64) predicate.UserAttributeValue {
  159. return predicate.UserAttributeValue(sql.FieldNotIn(FieldAttributeID, vs...))
  160. }
  161. // ValueEQ applies the EQ predicate on the "value" field.
  162. func ValueEQ(v string) predicate.UserAttributeValue {
  163. return predicate.UserAttributeValue(sql.FieldEQ(FieldValue, v))
  164. }
  165. // ValueNEQ applies the NEQ predicate on the "value" field.
  166. func ValueNEQ(v string) predicate.UserAttributeValue {
  167. return predicate.UserAttributeValue(sql.FieldNEQ(FieldValue, v))
  168. }
  169. // ValueIn applies the In predicate on the "value" field.
  170. func ValueIn(vs ...string) predicate.UserAttributeValue {
  171. return predicate.UserAttributeValue(sql.FieldIn(FieldValue, vs...))
  172. }
  173. // ValueNotIn applies the NotIn predicate on the "value" field.
  174. func ValueNotIn(vs ...string) predicate.UserAttributeValue {
  175. return predicate.UserAttributeValue(sql.FieldNotIn(FieldValue, vs...))
  176. }
  177. // ValueGT applies the GT predicate on the "value" field.
  178. func ValueGT(v string) predicate.UserAttributeValue {
  179. return predicate.UserAttributeValue(sql.FieldGT(FieldValue, v))
  180. }
  181. // ValueGTE applies the GTE predicate on the "value" field.
  182. func ValueGTE(v string) predicate.UserAttributeValue {
  183. return predicate.UserAttributeValue(sql.FieldGTE(FieldValue, v))
  184. }
  185. // ValueLT applies the LT predicate on the "value" field.
  186. func ValueLT(v string) predicate.UserAttributeValue {
  187. return predicate.UserAttributeValue(sql.FieldLT(FieldValue, v))
  188. }
  189. // ValueLTE applies the LTE predicate on the "value" field.
  190. func ValueLTE(v string) predicate.UserAttributeValue {
  191. return predicate.UserAttributeValue(sql.FieldLTE(FieldValue, v))
  192. }
  193. // ValueContains applies the Contains predicate on the "value" field.
  194. func ValueContains(v string) predicate.UserAttributeValue {
  195. return predicate.UserAttributeValue(sql.FieldContains(FieldValue, v))
  196. }
  197. // ValueHasPrefix applies the HasPrefix predicate on the "value" field.
  198. func ValueHasPrefix(v string) predicate.UserAttributeValue {
  199. return predicate.UserAttributeValue(sql.FieldHasPrefix(FieldValue, v))
  200. }
  201. // ValueHasSuffix applies the HasSuffix predicate on the "value" field.
  202. func ValueHasSuffix(v string) predicate.UserAttributeValue {
  203. return predicate.UserAttributeValue(sql.FieldHasSuffix(FieldValue, v))
  204. }
  205. // ValueEqualFold applies the EqualFold predicate on the "value" field.
  206. func ValueEqualFold(v string) predicate.UserAttributeValue {
  207. return predicate.UserAttributeValue(sql.FieldEqualFold(FieldValue, v))
  208. }
  209. // ValueContainsFold applies the ContainsFold predicate on the "value" field.
  210. func ValueContainsFold(v string) predicate.UserAttributeValue {
  211. return predicate.UserAttributeValue(sql.FieldContainsFold(FieldValue, v))
  212. }
  213. // HasUser applies the HasEdge predicate on the "user" edge.
  214. func HasUser() predicate.UserAttributeValue {
  215. return predicate.UserAttributeValue(func(s *sql.Selector) {
  216. step := sqlgraph.NewStep(
  217. sqlgraph.From(Table, FieldID),
  218. sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
  219. )
  220. sqlgraph.HasNeighbors(s, step)
  221. })
  222. }
  223. // HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
  224. func HasUserWith(preds ...predicate.User) predicate.UserAttributeValue {
  225. return predicate.UserAttributeValue(func(s *sql.Selector) {
  226. step := newUserStep()
  227. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  228. for _, p := range preds {
  229. p(s)
  230. }
  231. })
  232. })
  233. }
  234. // HasDefinition applies the HasEdge predicate on the "definition" edge.
  235. func HasDefinition() predicate.UserAttributeValue {
  236. return predicate.UserAttributeValue(func(s *sql.Selector) {
  237. step := sqlgraph.NewStep(
  238. sqlgraph.From(Table, FieldID),
  239. sqlgraph.Edge(sqlgraph.M2O, true, DefinitionTable, DefinitionColumn),
  240. )
  241. sqlgraph.HasNeighbors(s, step)
  242. })
  243. }
  244. // HasDefinitionWith applies the HasEdge predicate on the "definition" edge with a given conditions (other predicates).
  245. func HasDefinitionWith(preds ...predicate.UserAttributeDefinition) predicate.UserAttributeValue {
  246. return predicate.UserAttributeValue(func(s *sql.Selector) {
  247. step := newDefinitionStep()
  248. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  249. for _, p := range preds {
  250. p(s)
  251. }
  252. })
  253. })
  254. }
  255. // And groups predicates with the AND operator between them.
  256. func And(predicates ...predicate.UserAttributeValue) predicate.UserAttributeValue {
  257. return predicate.UserAttributeValue(sql.AndPredicates(predicates...))
  258. }
  259. // Or groups predicates with the OR operator between them.
  260. func Or(predicates ...predicate.UserAttributeValue) predicate.UserAttributeValue {
  261. return predicate.UserAttributeValue(sql.OrPredicates(predicates...))
  262. }
  263. // Not applies the not operator on the given predicate.
  264. func Not(p predicate.UserAttributeValue) predicate.UserAttributeValue {
  265. return predicate.UserAttributeValue(sql.NotPredicates(p))
  266. }