MCPcopy Index your code
hub / github.com/coder/coder / ConvertVariable

Method ConvertVariable

coderd/rbac/regosql/sqltypes/uuid.go:33–44  ·  view source on GitHub ↗
(rego ast.Ref)

Source from the content-addressed store, hash-verified

31func (astUUIDVar) UseAs() Node { return astUUIDVar{} }
32
33func (u astUUIDVar) ConvertVariable(rego ast.Ref) (Node, bool) {
34 left, err := RegoVarPath(u.FieldPath, rego)
35 if err == nil && len(left) == 0 {
36 return astUUIDVar{
37 Source: RegoSource(rego.String()),
38 FieldPath: u.FieldPath,
39 ColumnString: u.ColumnString,
40 }, true
41 }
42
43 return nil, false
44}
45
46func (u astUUIDVar) SQLString(_ *SQLGenerator) string {
47 return u.ColumnString

Callers

nothing calls this directly

Calls 3

RegoVarPathFunction · 0.85
RegoSourceTypeAlias · 0.85
StringMethod · 0.45

Tested by

no test coverage detected