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

Method UseAs

coderd/rbac/regosql/sqltypes/node.go:13–13  ·  view source on GitHub ↗

UseAs is a helper function to allow a node to be used as a different Node in operators. For example, a variable is really just a "string", so having the Equality operator check for "String" or "StringVar" is just excessive. Instead, we can just have the variable implement this function.

()

Source from the content-addressed store, hash-verified

11 // having the Equality operator check for "String" or "StringVar" is just
12 // excessive. Instead, we can just have the variable implement this function.
13 UseAs() Node
14}
15
16// BooleanNode is a node that returns a true/false when evaluated.

Callers 9

ContainsSQLMethod · 0.65
EqualsSQLStringMethod · 0.65
ContainsSQLMethod · 0.65
SQLStringMethod · 0.65
EqualsSQLStringMethod · 0.65
boolEqualsSQLStringFunction · 0.65
UseAsMethod · 0.65
EqualsSQLStringMethod · 0.65
EqualsSQLStringMethod · 0.65

Implementers 13

ACLMappingVarcoderd/rbac/regosql/acl_mapping_var.go
AstBooleancoderd/rbac/regosql/sqltypes/bool.go
AstNumbercoderd/rbac/regosql/sqltypes/number.go
invalidNodecoderd/rbac/regosql/sqltypes/node.go
ASTArraycoderd/rbac/regosql/sqltypes/array.go
AstStringcoderd/rbac/regosql/sqltypes/string.go
memberOfcoderd/rbac/regosql/sqltypes/member.go
equalitycoderd/rbac/regosql/sqltypes/equality.
astParenthesiscoderd/rbac/regosql/sqltypes/parens.go
astStringVarcoderd/rbac/regosql/sqltypes/variable.
alwaysFalsecoderd/rbac/regosql/sqltypes/always_fa
astUUIDVarcoderd/rbac/regosql/sqltypes/uuid.go

Calls

no outgoing calls

Tested by

no test coverage detected