import "github.com/CaliLuke/go-typeql/v3/given"Package given defines typed TypeQL input rows without a driver or CGo dependency.
type Rows
Rows supplies typed input rows for a TypeQL given stage.
type Rows interface {
MarshalGivenRows() ([]byte, error)
}type TypedRows
TypedRows contains values ordered by the declared TypeQL variable names.
type TypedRows struct {
Variables []string `json:"variables"`
Rows [][]Value `json:"rows"`
}func NewRows
func NewRows(variables ...string) *TypedRowsNewRows declares the variables shared by every row.
func (*TypedRows) Add
func (r *TypedRows) Add(values ...Value) errorAdd appends one row of values in variable order.
func (*TypedRows) MarshalGivenRows
func (r *TypedRows) MarshalGivenRows() ([]byte, error)MarshalGivenRows validates and encodes the rows for the driver.
type Value
Value is a typed value in a TypeQL given row.
type Value struct {
Type string `json:"type"`
Value any `json:"value,omitzero"`
}Generated by gomarkdoc