where.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. // Code generated by ent, DO NOT EDIT.
  2. package sopnode
  3. import (
  4. "time"
  5. "wechat-api/ent/predicate"
  6. "entgo.io/ent/dialect/sql"
  7. "entgo.io/ent/dialect/sql/sqlgraph"
  8. )
  9. // ID filters vertices based on their ID field.
  10. func ID(id uint64) predicate.SopNode {
  11. return predicate.SopNode(sql.FieldEQ(FieldID, id))
  12. }
  13. // IDEQ applies the EQ predicate on the ID field.
  14. func IDEQ(id uint64) predicate.SopNode {
  15. return predicate.SopNode(sql.FieldEQ(FieldID, id))
  16. }
  17. // IDNEQ applies the NEQ predicate on the ID field.
  18. func IDNEQ(id uint64) predicate.SopNode {
  19. return predicate.SopNode(sql.FieldNEQ(FieldID, id))
  20. }
  21. // IDIn applies the In predicate on the ID field.
  22. func IDIn(ids ...uint64) predicate.SopNode {
  23. return predicate.SopNode(sql.FieldIn(FieldID, ids...))
  24. }
  25. // IDNotIn applies the NotIn predicate on the ID field.
  26. func IDNotIn(ids ...uint64) predicate.SopNode {
  27. return predicate.SopNode(sql.FieldNotIn(FieldID, ids...))
  28. }
  29. // IDGT applies the GT predicate on the ID field.
  30. func IDGT(id uint64) predicate.SopNode {
  31. return predicate.SopNode(sql.FieldGT(FieldID, id))
  32. }
  33. // IDGTE applies the GTE predicate on the ID field.
  34. func IDGTE(id uint64) predicate.SopNode {
  35. return predicate.SopNode(sql.FieldGTE(FieldID, id))
  36. }
  37. // IDLT applies the LT predicate on the ID field.
  38. func IDLT(id uint64) predicate.SopNode {
  39. return predicate.SopNode(sql.FieldLT(FieldID, id))
  40. }
  41. // IDLTE applies the LTE predicate on the ID field.
  42. func IDLTE(id uint64) predicate.SopNode {
  43. return predicate.SopNode(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.SopNode {
  47. return predicate.SopNode(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.SopNode {
  51. return predicate.SopNode(sql.FieldEQ(FieldUpdatedAt, v))
  52. }
  53. // Status applies equality check predicate on the "status" field. It's identical to StatusEQ.
  54. func Status(v uint8) predicate.SopNode {
  55. return predicate.SopNode(sql.FieldEQ(FieldStatus, v))
  56. }
  57. // DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
  58. func DeletedAt(v time.Time) predicate.SopNode {
  59. return predicate.SopNode(sql.FieldEQ(FieldDeletedAt, v))
  60. }
  61. // StageID applies equality check predicate on the "stage_id" field. It's identical to StageIDEQ.
  62. func StageID(v uint64) predicate.SopNode {
  63. return predicate.SopNode(sql.FieldEQ(FieldStageID, v))
  64. }
  65. // ParentID applies equality check predicate on the "parent_id" field. It's identical to ParentIDEQ.
  66. func ParentID(v uint64) predicate.SopNode {
  67. return predicate.SopNode(sql.FieldEQ(FieldParentID, v))
  68. }
  69. // Name applies equality check predicate on the "name" field. It's identical to NameEQ.
  70. func Name(v string) predicate.SopNode {
  71. return predicate.SopNode(sql.FieldEQ(FieldName, v))
  72. }
  73. // ConditionType applies equality check predicate on the "condition_type" field. It's identical to ConditionTypeEQ.
  74. func ConditionType(v int) predicate.SopNode {
  75. return predicate.SopNode(sql.FieldEQ(FieldConditionType, v))
  76. }
  77. // CreatedAtEQ applies the EQ predicate on the "created_at" field.
  78. func CreatedAtEQ(v time.Time) predicate.SopNode {
  79. return predicate.SopNode(sql.FieldEQ(FieldCreatedAt, v))
  80. }
  81. // CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
  82. func CreatedAtNEQ(v time.Time) predicate.SopNode {
  83. return predicate.SopNode(sql.FieldNEQ(FieldCreatedAt, v))
  84. }
  85. // CreatedAtIn applies the In predicate on the "created_at" field.
  86. func CreatedAtIn(vs ...time.Time) predicate.SopNode {
  87. return predicate.SopNode(sql.FieldIn(FieldCreatedAt, vs...))
  88. }
  89. // CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
  90. func CreatedAtNotIn(vs ...time.Time) predicate.SopNode {
  91. return predicate.SopNode(sql.FieldNotIn(FieldCreatedAt, vs...))
  92. }
  93. // CreatedAtGT applies the GT predicate on the "created_at" field.
  94. func CreatedAtGT(v time.Time) predicate.SopNode {
  95. return predicate.SopNode(sql.FieldGT(FieldCreatedAt, v))
  96. }
  97. // CreatedAtGTE applies the GTE predicate on the "created_at" field.
  98. func CreatedAtGTE(v time.Time) predicate.SopNode {
  99. return predicate.SopNode(sql.FieldGTE(FieldCreatedAt, v))
  100. }
  101. // CreatedAtLT applies the LT predicate on the "created_at" field.
  102. func CreatedAtLT(v time.Time) predicate.SopNode {
  103. return predicate.SopNode(sql.FieldLT(FieldCreatedAt, v))
  104. }
  105. // CreatedAtLTE applies the LTE predicate on the "created_at" field.
  106. func CreatedAtLTE(v time.Time) predicate.SopNode {
  107. return predicate.SopNode(sql.FieldLTE(FieldCreatedAt, v))
  108. }
  109. // UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
  110. func UpdatedAtEQ(v time.Time) predicate.SopNode {
  111. return predicate.SopNode(sql.FieldEQ(FieldUpdatedAt, v))
  112. }
  113. // UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
  114. func UpdatedAtNEQ(v time.Time) predicate.SopNode {
  115. return predicate.SopNode(sql.FieldNEQ(FieldUpdatedAt, v))
  116. }
  117. // UpdatedAtIn applies the In predicate on the "updated_at" field.
  118. func UpdatedAtIn(vs ...time.Time) predicate.SopNode {
  119. return predicate.SopNode(sql.FieldIn(FieldUpdatedAt, vs...))
  120. }
  121. // UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
  122. func UpdatedAtNotIn(vs ...time.Time) predicate.SopNode {
  123. return predicate.SopNode(sql.FieldNotIn(FieldUpdatedAt, vs...))
  124. }
  125. // UpdatedAtGT applies the GT predicate on the "updated_at" field.
  126. func UpdatedAtGT(v time.Time) predicate.SopNode {
  127. return predicate.SopNode(sql.FieldGT(FieldUpdatedAt, v))
  128. }
  129. // UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
  130. func UpdatedAtGTE(v time.Time) predicate.SopNode {
  131. return predicate.SopNode(sql.FieldGTE(FieldUpdatedAt, v))
  132. }
  133. // UpdatedAtLT applies the LT predicate on the "updated_at" field.
  134. func UpdatedAtLT(v time.Time) predicate.SopNode {
  135. return predicate.SopNode(sql.FieldLT(FieldUpdatedAt, v))
  136. }
  137. // UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
  138. func UpdatedAtLTE(v time.Time) predicate.SopNode {
  139. return predicate.SopNode(sql.FieldLTE(FieldUpdatedAt, v))
  140. }
  141. // StatusEQ applies the EQ predicate on the "status" field.
  142. func StatusEQ(v uint8) predicate.SopNode {
  143. return predicate.SopNode(sql.FieldEQ(FieldStatus, v))
  144. }
  145. // StatusNEQ applies the NEQ predicate on the "status" field.
  146. func StatusNEQ(v uint8) predicate.SopNode {
  147. return predicate.SopNode(sql.FieldNEQ(FieldStatus, v))
  148. }
  149. // StatusIn applies the In predicate on the "status" field.
  150. func StatusIn(vs ...uint8) predicate.SopNode {
  151. return predicate.SopNode(sql.FieldIn(FieldStatus, vs...))
  152. }
  153. // StatusNotIn applies the NotIn predicate on the "status" field.
  154. func StatusNotIn(vs ...uint8) predicate.SopNode {
  155. return predicate.SopNode(sql.FieldNotIn(FieldStatus, vs...))
  156. }
  157. // StatusGT applies the GT predicate on the "status" field.
  158. func StatusGT(v uint8) predicate.SopNode {
  159. return predicate.SopNode(sql.FieldGT(FieldStatus, v))
  160. }
  161. // StatusGTE applies the GTE predicate on the "status" field.
  162. func StatusGTE(v uint8) predicate.SopNode {
  163. return predicate.SopNode(sql.FieldGTE(FieldStatus, v))
  164. }
  165. // StatusLT applies the LT predicate on the "status" field.
  166. func StatusLT(v uint8) predicate.SopNode {
  167. return predicate.SopNode(sql.FieldLT(FieldStatus, v))
  168. }
  169. // StatusLTE applies the LTE predicate on the "status" field.
  170. func StatusLTE(v uint8) predicate.SopNode {
  171. return predicate.SopNode(sql.FieldLTE(FieldStatus, v))
  172. }
  173. // StatusIsNil applies the IsNil predicate on the "status" field.
  174. func StatusIsNil() predicate.SopNode {
  175. return predicate.SopNode(sql.FieldIsNull(FieldStatus))
  176. }
  177. // StatusNotNil applies the NotNil predicate on the "status" field.
  178. func StatusNotNil() predicate.SopNode {
  179. return predicate.SopNode(sql.FieldNotNull(FieldStatus))
  180. }
  181. // DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
  182. func DeletedAtEQ(v time.Time) predicate.SopNode {
  183. return predicate.SopNode(sql.FieldEQ(FieldDeletedAt, v))
  184. }
  185. // DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
  186. func DeletedAtNEQ(v time.Time) predicate.SopNode {
  187. return predicate.SopNode(sql.FieldNEQ(FieldDeletedAt, v))
  188. }
  189. // DeletedAtIn applies the In predicate on the "deleted_at" field.
  190. func DeletedAtIn(vs ...time.Time) predicate.SopNode {
  191. return predicate.SopNode(sql.FieldIn(FieldDeletedAt, vs...))
  192. }
  193. // DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
  194. func DeletedAtNotIn(vs ...time.Time) predicate.SopNode {
  195. return predicate.SopNode(sql.FieldNotIn(FieldDeletedAt, vs...))
  196. }
  197. // DeletedAtGT applies the GT predicate on the "deleted_at" field.
  198. func DeletedAtGT(v time.Time) predicate.SopNode {
  199. return predicate.SopNode(sql.FieldGT(FieldDeletedAt, v))
  200. }
  201. // DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
  202. func DeletedAtGTE(v time.Time) predicate.SopNode {
  203. return predicate.SopNode(sql.FieldGTE(FieldDeletedAt, v))
  204. }
  205. // DeletedAtLT applies the LT predicate on the "deleted_at" field.
  206. func DeletedAtLT(v time.Time) predicate.SopNode {
  207. return predicate.SopNode(sql.FieldLT(FieldDeletedAt, v))
  208. }
  209. // DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
  210. func DeletedAtLTE(v time.Time) predicate.SopNode {
  211. return predicate.SopNode(sql.FieldLTE(FieldDeletedAt, v))
  212. }
  213. // DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
  214. func DeletedAtIsNil() predicate.SopNode {
  215. return predicate.SopNode(sql.FieldIsNull(FieldDeletedAt))
  216. }
  217. // DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
  218. func DeletedAtNotNil() predicate.SopNode {
  219. return predicate.SopNode(sql.FieldNotNull(FieldDeletedAt))
  220. }
  221. // StageIDEQ applies the EQ predicate on the "stage_id" field.
  222. func StageIDEQ(v uint64) predicate.SopNode {
  223. return predicate.SopNode(sql.FieldEQ(FieldStageID, v))
  224. }
  225. // StageIDNEQ applies the NEQ predicate on the "stage_id" field.
  226. func StageIDNEQ(v uint64) predicate.SopNode {
  227. return predicate.SopNode(sql.FieldNEQ(FieldStageID, v))
  228. }
  229. // StageIDIn applies the In predicate on the "stage_id" field.
  230. func StageIDIn(vs ...uint64) predicate.SopNode {
  231. return predicate.SopNode(sql.FieldIn(FieldStageID, vs...))
  232. }
  233. // StageIDNotIn applies the NotIn predicate on the "stage_id" field.
  234. func StageIDNotIn(vs ...uint64) predicate.SopNode {
  235. return predicate.SopNode(sql.FieldNotIn(FieldStageID, vs...))
  236. }
  237. // ParentIDEQ applies the EQ predicate on the "parent_id" field.
  238. func ParentIDEQ(v uint64) predicate.SopNode {
  239. return predicate.SopNode(sql.FieldEQ(FieldParentID, v))
  240. }
  241. // ParentIDNEQ applies the NEQ predicate on the "parent_id" field.
  242. func ParentIDNEQ(v uint64) predicate.SopNode {
  243. return predicate.SopNode(sql.FieldNEQ(FieldParentID, v))
  244. }
  245. // ParentIDIn applies the In predicate on the "parent_id" field.
  246. func ParentIDIn(vs ...uint64) predicate.SopNode {
  247. return predicate.SopNode(sql.FieldIn(FieldParentID, vs...))
  248. }
  249. // ParentIDNotIn applies the NotIn predicate on the "parent_id" field.
  250. func ParentIDNotIn(vs ...uint64) predicate.SopNode {
  251. return predicate.SopNode(sql.FieldNotIn(FieldParentID, vs...))
  252. }
  253. // ParentIDGT applies the GT predicate on the "parent_id" field.
  254. func ParentIDGT(v uint64) predicate.SopNode {
  255. return predicate.SopNode(sql.FieldGT(FieldParentID, v))
  256. }
  257. // ParentIDGTE applies the GTE predicate on the "parent_id" field.
  258. func ParentIDGTE(v uint64) predicate.SopNode {
  259. return predicate.SopNode(sql.FieldGTE(FieldParentID, v))
  260. }
  261. // ParentIDLT applies the LT predicate on the "parent_id" field.
  262. func ParentIDLT(v uint64) predicate.SopNode {
  263. return predicate.SopNode(sql.FieldLT(FieldParentID, v))
  264. }
  265. // ParentIDLTE applies the LTE predicate on the "parent_id" field.
  266. func ParentIDLTE(v uint64) predicate.SopNode {
  267. return predicate.SopNode(sql.FieldLTE(FieldParentID, v))
  268. }
  269. // NameEQ applies the EQ predicate on the "name" field.
  270. func NameEQ(v string) predicate.SopNode {
  271. return predicate.SopNode(sql.FieldEQ(FieldName, v))
  272. }
  273. // NameNEQ applies the NEQ predicate on the "name" field.
  274. func NameNEQ(v string) predicate.SopNode {
  275. return predicate.SopNode(sql.FieldNEQ(FieldName, v))
  276. }
  277. // NameIn applies the In predicate on the "name" field.
  278. func NameIn(vs ...string) predicate.SopNode {
  279. return predicate.SopNode(sql.FieldIn(FieldName, vs...))
  280. }
  281. // NameNotIn applies the NotIn predicate on the "name" field.
  282. func NameNotIn(vs ...string) predicate.SopNode {
  283. return predicate.SopNode(sql.FieldNotIn(FieldName, vs...))
  284. }
  285. // NameGT applies the GT predicate on the "name" field.
  286. func NameGT(v string) predicate.SopNode {
  287. return predicate.SopNode(sql.FieldGT(FieldName, v))
  288. }
  289. // NameGTE applies the GTE predicate on the "name" field.
  290. func NameGTE(v string) predicate.SopNode {
  291. return predicate.SopNode(sql.FieldGTE(FieldName, v))
  292. }
  293. // NameLT applies the LT predicate on the "name" field.
  294. func NameLT(v string) predicate.SopNode {
  295. return predicate.SopNode(sql.FieldLT(FieldName, v))
  296. }
  297. // NameLTE applies the LTE predicate on the "name" field.
  298. func NameLTE(v string) predicate.SopNode {
  299. return predicate.SopNode(sql.FieldLTE(FieldName, v))
  300. }
  301. // NameContains applies the Contains predicate on the "name" field.
  302. func NameContains(v string) predicate.SopNode {
  303. return predicate.SopNode(sql.FieldContains(FieldName, v))
  304. }
  305. // NameHasPrefix applies the HasPrefix predicate on the "name" field.
  306. func NameHasPrefix(v string) predicate.SopNode {
  307. return predicate.SopNode(sql.FieldHasPrefix(FieldName, v))
  308. }
  309. // NameHasSuffix applies the HasSuffix predicate on the "name" field.
  310. func NameHasSuffix(v string) predicate.SopNode {
  311. return predicate.SopNode(sql.FieldHasSuffix(FieldName, v))
  312. }
  313. // NameEqualFold applies the EqualFold predicate on the "name" field.
  314. func NameEqualFold(v string) predicate.SopNode {
  315. return predicate.SopNode(sql.FieldEqualFold(FieldName, v))
  316. }
  317. // NameContainsFold applies the ContainsFold predicate on the "name" field.
  318. func NameContainsFold(v string) predicate.SopNode {
  319. return predicate.SopNode(sql.FieldContainsFold(FieldName, v))
  320. }
  321. // ConditionTypeEQ applies the EQ predicate on the "condition_type" field.
  322. func ConditionTypeEQ(v int) predicate.SopNode {
  323. return predicate.SopNode(sql.FieldEQ(FieldConditionType, v))
  324. }
  325. // ConditionTypeNEQ applies the NEQ predicate on the "condition_type" field.
  326. func ConditionTypeNEQ(v int) predicate.SopNode {
  327. return predicate.SopNode(sql.FieldNEQ(FieldConditionType, v))
  328. }
  329. // ConditionTypeIn applies the In predicate on the "condition_type" field.
  330. func ConditionTypeIn(vs ...int) predicate.SopNode {
  331. return predicate.SopNode(sql.FieldIn(FieldConditionType, vs...))
  332. }
  333. // ConditionTypeNotIn applies the NotIn predicate on the "condition_type" field.
  334. func ConditionTypeNotIn(vs ...int) predicate.SopNode {
  335. return predicate.SopNode(sql.FieldNotIn(FieldConditionType, vs...))
  336. }
  337. // ConditionTypeGT applies the GT predicate on the "condition_type" field.
  338. func ConditionTypeGT(v int) predicate.SopNode {
  339. return predicate.SopNode(sql.FieldGT(FieldConditionType, v))
  340. }
  341. // ConditionTypeGTE applies the GTE predicate on the "condition_type" field.
  342. func ConditionTypeGTE(v int) predicate.SopNode {
  343. return predicate.SopNode(sql.FieldGTE(FieldConditionType, v))
  344. }
  345. // ConditionTypeLT applies the LT predicate on the "condition_type" field.
  346. func ConditionTypeLT(v int) predicate.SopNode {
  347. return predicate.SopNode(sql.FieldLT(FieldConditionType, v))
  348. }
  349. // ConditionTypeLTE applies the LTE predicate on the "condition_type" field.
  350. func ConditionTypeLTE(v int) predicate.SopNode {
  351. return predicate.SopNode(sql.FieldLTE(FieldConditionType, v))
  352. }
  353. // ConditionListIsNil applies the IsNil predicate on the "condition_list" field.
  354. func ConditionListIsNil() predicate.SopNode {
  355. return predicate.SopNode(sql.FieldIsNull(FieldConditionList))
  356. }
  357. // ConditionListNotNil applies the NotNil predicate on the "condition_list" field.
  358. func ConditionListNotNil() predicate.SopNode {
  359. return predicate.SopNode(sql.FieldNotNull(FieldConditionList))
  360. }
  361. // ActionMessageIsNil applies the IsNil predicate on the "action_message" field.
  362. func ActionMessageIsNil() predicate.SopNode {
  363. return predicate.SopNode(sql.FieldIsNull(FieldActionMessage))
  364. }
  365. // ActionMessageNotNil applies the NotNil predicate on the "action_message" field.
  366. func ActionMessageNotNil() predicate.SopNode {
  367. return predicate.SopNode(sql.FieldNotNull(FieldActionMessage))
  368. }
  369. // ActionLabelIsNil applies the IsNil predicate on the "action_label" field.
  370. func ActionLabelIsNil() predicate.SopNode {
  371. return predicate.SopNode(sql.FieldIsNull(FieldActionLabel))
  372. }
  373. // ActionLabelNotNil applies the NotNil predicate on the "action_label" field.
  374. func ActionLabelNotNil() predicate.SopNode {
  375. return predicate.SopNode(sql.FieldNotNull(FieldActionLabel))
  376. }
  377. // HasSopStage applies the HasEdge predicate on the "sop_stage" edge.
  378. func HasSopStage() predicate.SopNode {
  379. return predicate.SopNode(func(s *sql.Selector) {
  380. step := sqlgraph.NewStep(
  381. sqlgraph.From(Table, FieldID),
  382. sqlgraph.Edge(sqlgraph.M2O, true, SopStageTable, SopStageColumn),
  383. )
  384. sqlgraph.HasNeighbors(s, step)
  385. })
  386. }
  387. // HasSopStageWith applies the HasEdge predicate on the "sop_stage" edge with a given conditions (other predicates).
  388. func HasSopStageWith(preds ...predicate.SopStage) predicate.SopNode {
  389. return predicate.SopNode(func(s *sql.Selector) {
  390. step := newSopStageStep()
  391. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  392. for _, p := range preds {
  393. p(s)
  394. }
  395. })
  396. })
  397. }
  398. // HasNodeMessages applies the HasEdge predicate on the "node_messages" edge.
  399. func HasNodeMessages() predicate.SopNode {
  400. return predicate.SopNode(func(s *sql.Selector) {
  401. step := sqlgraph.NewStep(
  402. sqlgraph.From(Table, FieldID),
  403. sqlgraph.Edge(sqlgraph.O2M, false, NodeMessagesTable, NodeMessagesColumn),
  404. )
  405. sqlgraph.HasNeighbors(s, step)
  406. })
  407. }
  408. // HasNodeMessagesWith applies the HasEdge predicate on the "node_messages" edge with a given conditions (other predicates).
  409. func HasNodeMessagesWith(preds ...predicate.MessageRecords) predicate.SopNode {
  410. return predicate.SopNode(func(s *sql.Selector) {
  411. step := newNodeMessagesStep()
  412. sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
  413. for _, p := range preds {
  414. p(s)
  415. }
  416. })
  417. })
  418. }
  419. // And groups predicates with the AND operator between them.
  420. func And(predicates ...predicate.SopNode) predicate.SopNode {
  421. return predicate.SopNode(sql.AndPredicates(predicates...))
  422. }
  423. // Or groups predicates with the OR operator between them.
  424. func Or(predicates ...predicate.SopNode) predicate.SopNode {
  425. return predicate.SopNode(sql.OrPredicates(predicates...))
  426. }
  427. // Not applies the not operator on the given predicate.
  428. func Not(p predicate.SopNode) predicate.SopNode {
  429. return predicate.SopNode(sql.NotPredicates(p))
  430. }