ConvertVariable will return a new astStringVar Node if the given rego Ref matches this astStringVar.
(rego ast.Ref)
| 88 | // ConvertVariable will return a new astStringVar Node if the given rego Ref |
| 89 | // matches this astStringVar. |
| 90 | func (s astStringVar) ConvertVariable(rego ast.Ref) (Node, bool) { |
| 91 | left, err := RegoVarPath(s.FieldPath, rego) |
| 92 | if err == nil && len(left) == 0 { |
| 93 | return astStringVar{ |
| 94 | Source: RegoSource(rego.String()), |
| 95 | FieldPath: s.FieldPath, |
| 96 | ColumnString: s.ColumnString, |
| 97 | }, true |
| 98 | } |
| 99 | |
| 100 | return nil, false |
| 101 | } |
| 102 | |
| 103 | func (s astStringVar) SQLString(_ *SQLGenerator) string { |
| 104 | return s.ColumnString |
nothing calls this directly
no test coverage detected