expressions

package
v0.403.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsContext added in v0.400.0

func IsContext(fragments []string) bool

func IsContextDbColumn added in v0.400.0

func IsContextDbColumn(fragments []string) bool

IsContextDbColumn returns true if the expression refers to a value on the context which will require database access (such as with identity backlinks), such as: @permission(expression: ctx.identity.user.isActive)

func IsContextEnvField added in v0.400.0

func IsContextEnvField(fragments []string) bool

func IsContextField added in v0.400.0

func IsContextField(fragments []string) bool

func IsContextHeadersField added in v0.400.0

func IsContextHeadersField(fragments []string) bool

func IsContextIdentity added in v0.400.0

func IsContextIdentity(fragments []string) bool

func IsContextIdentityId added in v0.400.0

func IsContextIdentityId(fragments []string) bool

func IsContextIsAuthenticatedField added in v0.400.0

func IsContextIsAuthenticatedField(fragments []string) bool

func IsContextNowField added in v0.400.0

func IsContextNowField(fragments []string) bool

func IsContextSecretField added in v0.400.0

func IsContextSecretField(fragments []string) bool

func IsImplicitInput added in v0.400.0

func IsImplicitInput(schema *proto.Schema, action *proto.Action, fragments []string) bool

IsImplicitInput returns true if the expression operand refers to an implicit input on an action. For example, an input value provided in a create action might require validation, such as: create createThing() with (name) @validation(name != "")

func IsInput added in v0.400.0

func IsInput(schema *proto.Schema, action *proto.Action, fragments []string) bool

IsInput returns true if the expression operand refers to a named input or a model field input on an action. For example, for a where condition might use an named input, such as: list listThings(isActive: Boolean) @where(thing.isActive == isActive) Or a model field input, such as: list listThings(thing.isActive)

func IsModelDbColumn added in v0.400.0

func IsModelDbColumn(model *proto.Model, fragments []string) bool

IsModelDbColumn returns true if the expression operand refers to a field value residing in the database. For example, a where condition might filter on reading data, such as: @where(post.author.isActive)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL