checkColumn checks if the column exists in the given table.
(t, c string)
| 90 | |
| 91 | // checkColumn checks if the column exists in the given table. |
| 92 | func checkColumn(t, c string) error { |
| 93 | initCheck.Do(func() { |
| 94 | columnCheck = sql.NewColumnCheck(map[string]func(string) bool{ |
| 95 | apitoken.Table: apitoken.ValidColumn, |
| 96 | attestation.Table: attestation.ValidColumn, |
| 97 | casbackend.Table: casbackend.ValidColumn, |
| 98 | casmapping.Table: casmapping.ValidColumn, |
| 99 | group.Table: group.ValidColumn, |
| 100 | groupmembership.Table: groupmembership.ValidColumn, |
| 101 | integration.Table: integration.ValidColumn, |
| 102 | integrationattachment.Table: integrationattachment.ValidColumn, |
| 103 | membership.Table: membership.ValidColumn, |
| 104 | orginvitation.Table: orginvitation.ValidColumn, |
| 105 | organization.Table: organization.ValidColumn, |
| 106 | project.Table: project.ValidColumn, |
| 107 | projectversion.Table: projectversion.ValidColumn, |
| 108 | referrer.Table: referrer.ValidColumn, |
| 109 | robotaccount.Table: robotaccount.ValidColumn, |
| 110 | user.Table: user.ValidColumn, |
| 111 | workflow.Table: workflow.ValidColumn, |
| 112 | workflowcontract.Table: workflowcontract.ValidColumn, |
| 113 | workflowcontractversion.Table: workflowcontractversion.ValidColumn, |
| 114 | workflowrun.Table: workflowrun.ValidColumn, |
| 115 | }) |
| 116 | }) |
| 117 | return columnCheck(t, c) |
| 118 | } |
| 119 | |
| 120 | // Asc applies the given fields in ASC order. |
| 121 | func Asc(fields ...string) func(*sql.Selector) { |